When I run a template with
{% if craft.app.request.headers.get('x-request-type') == 'fetch' %}
{% header 'Content-Type: text/plain; charset=UTF-8' %}
{{ include('types/_' ~ entry.type) }}
{% exit %}
{% endif %}
because I just want to render a partial (without the extra markup required for a full page), the exit call makes it ignore my explicit content-type header.
This can of course be circumvented with an else, but it doesn't seem like this was intentional, and sounds like a bug. Also cleaner to fast exit IMHO.
Thanks for reporting that! Just fixed for the next release.
Holy shit, you guys are fast! I love it.