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

HTTP 204 No Content with Transfer-Encoding header violates RFC 7230 #165

Closed
alexanderlukanin13 opened this Issue Jun 6, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@alexanderlukanin13
Contributor

alexanderlukanin13 commented Jun 6, 2017

Currently, waitress 204 response looks like this:

HTTP/1.1 204 No Content
Allow: GET, DELETE, HEAD, OPTIONS
Connection: close
Date: Tue, 06 Jun 2017 07:43:55 GMT
Server: waitress
Transfer-Encoding: chunked
Vary: Accept
X-Frame-Options: SAMEORIGIN

Transfer-Encoding violates RFC 7230:

https://tools.ietf.org/html/rfc7230#section-3.3.1

A server MUST NOT send a Transfer-Encoding header field in any response with a status code of 1xx (Informational) or 204 (No Content).

https://tools.ietf.org/html/rfc7230#section-3.3.2

A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content).

In practice, such behavior breaks some clients, such as requests (if server is behind Google Cloud Load Balancer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment