Skip to content

add Body::make_head and AsMut<Body> for Response #190

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

jbr
Copy link
Member

@jbr jbr commented Jun 29, 2020

When responding to a HEAD request, body content should not be sent. Currently there is no way to retain the content length, but remove the actual content.

This PR:

  • provides an affordance to strip out the content of the body but retain the content length.
  • provides an AsMut<Body> for Response, which makes the use of make_head more convenient

I'm not happy with the name make_head, so please suggest improvements

refs: http-rs/tide#623

@jbr
Copy link
Member Author

jbr commented Jun 29, 2020

Closing because async-h1 hangs indefinitely, so this needs to be addressed there

@jbr jbr closed this Jun 29, 2020
@jbr jbr removed the request for review from yoshuawuyts June 29, 2020 23:11
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.

1 participant