Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsonStrategy should not set content-transfer-encoding response header #25

Open
weierophinney opened this issue Dec 31, 2019 · 0 comments

Comments

@weierophinney
Copy link
Member

As of zendframework/zendframework#3483, JsonStrategy adds the Content-Transfer-Encoding header when using UTF-16 or UTF-32. I believe doing so is incorrect, as Content-Transfer-Encoding is a MIME header, not an HTTP header.

https://tools.ietf.org/html/rfc7231#appendix-A.5:

HTTP does not use the Content-Transfer-Encoding field of MIME.
Proxies and gateways from MIME-compliant protocols to HTTP need to
remove any Content-Transfer-Encoding prior to delivering the response
message to an HTTP client.

Apparently the confusion originated with a comment on that pull request, which is probably due to a misunderstanding of the poorly described "encoding considerations" of https://tools.ietf.org/html/rfc4627#section-6. The confusing reference to content-transfer-encoding was removed in the RFC that replaced it.

See issue #61, which was also introduced by zendframework/zendframework#3483.


Originally posted by @ademarre at zendframework/zend-view#62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant