-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Clear fewer headers on 1xx/204/304 responses #2727
Conversation
We should definitely permit the The primary purpose of this method is to clear the The RFCs have changed significantly since this function was written. It cites the definition of entity headers from RFC 2616 §7.1, which appears to have been replaced by a much shorter list of representation metadata headers in RFC 7231 §3.1 ( So this is what I'd do: rename |
Sure. Updated as such. |
Looks good, now the test |
tornado/web.py
Outdated
# 304 responses should not contain entity headers (defined in | ||
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1) | ||
def _clear_representation_headers(self) -> None: | ||
# 304 responses should not representation metadata headers (defined in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... shoud not contain representation metadata headers...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed, now with passing CI.
This function is called on more than just 304 responses; it’s important to permit the Allow header on 204 responses. Also, the relevant RFCs have changed significantly. Fixes tornadoweb#2726. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Thanks! |
This function is called on more than just 304 responses; it’s important to permit the Allow header on 204 responses. Also, the relevant RFCs have changed significantly.
Fixes #2726.