• Jérome Perrin's avatar
    xhtml_style: don't set content type header if already set · 88faeb11
    Jérome Perrin authored
    This is necessary on Zope4 because the error page is executed even if
    the response already has a locked body - and in this case we don't
    want to override the content-type header that might also have been set.
    
    One user of this is Base_redirect from erp5_hal_json_style, when
    abort_transaction is True, in that case it sets a body in json, a
    content type header of application/json and then raise a redirect so
    that the transaction is not commited. This fixes a problem visible on
    Zope4 with erp5_bank_reconciliation_renderjs_ui_test:testFunctionalRJSBankReconciliationAction
    88faeb11
global_definitions.zpt 5.39 KB