Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

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

Open
ademarre opened this issue May 17, 2016 · 1 comment
Open

Comments

@ademarre
Copy link

ademarre commented May 17, 2016

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.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-view; a new issue has been opened at laminas/laminas-view#25.

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

No branches or pull requests

2 participants