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

unsafeReceiveResponse that does not consume body #115

Merged

Conversation

singpolyma
Copy link
Contributor

This works when you know there is no body, no matter what the headers
say (HEAD requests, #114)

This also works when the handler consumes whatever part of the body you
actually want to use, and then you close the connection afterwards (no
reusing for pipelining!) Sometimes this is a lot faster than using
pipelining if you can, for example, skip a many GB download (#113)

@istathar
Copy link
Member

Only change I'd ask you to make would be to rename the function to unsafeReceiveResponse. Will merge, thanks!

@singpolyma singpolyma force-pushed the allow-receive-response-skip-body branch from a233f32 to 3b6d7b6 Compare August 23, 2018 14:33
This works when you know there is no body, no matter what the headers
say (HEAD requests, aesiniath#114)

This also works when the handler consumes whatever part of the body you
actually want to use, and then you close the connection afterwards (no
reusing for pipelining!)  Sometimes this is a lot faster than using
pipelining if you can, for example, skip a many GB download (aesiniath#113)
@singpolyma singpolyma force-pushed the allow-receive-response-skip-body branch from 3b6d7b6 to 5d48210 Compare August 23, 2018 14:34
@singpolyma singpolyma changed the title receivedResponseUnsafe that does not consume body unsafeReceiveResponse that does not consume body Aug 23, 2018
@singpolyma
Copy link
Contributor Author

@afcowie changed :)

@istathar istathar merged commit 5d48210 into aesiniath:master Aug 24, 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.

None yet

2 participants