Skip to content

strip body on head request #49

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

Closed
wants to merge 1 commit into from

Conversation

tzilist
Copy link
Contributor

@tzilist tzilist commented Nov 19, 2018

Hopefully fixes issue #45. Not sure exactly where this logic belongs but seems to make sense to me. :)

@tirr-c
Copy link
Collaborator

tirr-c commented Nov 19, 2018

The response header of HEAD should be identical to that of GET, but it is tricky because of Content-Length header. It is handled by Payload trait from Hyper, which is implemented for hyper::Body.

If you give empty body to the response, Content-Length will be 0, which leads to the mismatch of headers. We need to implement Payload manually, but it requires Poll from futures 0.1 (from function signature).

@tzilist
Copy link
Contributor Author

tzilist commented Nov 19, 2018

Oh wow, that is a great point! I'll dig into this a bit more then. :)

@tzilist
Copy link
Contributor Author

tzilist commented Nov 19, 2018

Holding off on this until questions in #45 are resolved

@aturon
Copy link
Collaborator

aturon commented Dec 4, 2018

Given how #45 has gone, I'm gonna close this out. It'd be great to get a PR documenting Hyper's behavior and how Tide relies on it, though!

@aturon aturon closed this Dec 4, 2018
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

Successfully merging this pull request may close these issues.

3 participants