Commit 3c8fcd51 authored by Jérome Perrin's avatar Jérome Perrin

xhtml_style: don't set content type header if already set

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
parent f9fe3a25
Pipeline #23113 failed with stage
in 0 seconds