This was ticket #1971 from the old Trac, reported by Chris Arndt:
In view.base.render the content type in the response headers is determined by looking at the output format. A source code comment says:
# We simply derive the content type from the format here # and use the charset specified in the configuration setting. # This could be improved by also examining the engine and the output.
A better solution would also handle the cases where format is XTMLSerializer, XMLSerializer or PlainSerializer instance and derive the proper content type.