I've checked earlier and at the time that [`assign_default_content_type_and_charset!`][1] got called, we already lost context on what option `render` was called with, as they got rendered to string and put back in `@body`.

What do you think would be an acceptable way of doing this? 

[1]: https://github.com/rails/rails/blob/8ce72d91b68ef61ce7149ccac0c1be8923561ac2/actionpack/lib/action_dispatch/http/response.rb#L290