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

Responses to HEAD requests and certain status codes never contain a body #156

Merged
merged 3 commits into from
Mar 31, 2017

Conversation

clue
Copy link
Member

@clue clue commented Mar 30, 2017

This PR ensures we obey the HTTP specs and never send a response body for HEAD request. Similarly, certain status codes do not permit a message body.

This happens automatically, so that consumers of this lib do not have to take care of this. This also applies to our error handling logic, which now uses the same routines to ensure an invalid HEAD request does not send a response body.

See https://tools.ietf.org/html/rfc7230#section-3.3, https://tools.ietf.org/html/rfc7230#section-3.3.1 and https://tools.ietf.org/html/rfc7230#section-3.3.2

Builds on top of #152

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

Successfully merging this pull request may close these issues.

3 participants