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

Send connection close when there is unconsumed payload #3472

Merged
merged 5 commits into from May 29, 2017

Conversation

@kanongil
Copy link
Contributor

@kanongil kanongil commented Apr 11, 2017

With payload.output === 'stream', there is no guarantee or requirement that the user consumes the incoming payload. When a response is sent with an unconsumed payload, the connection needs to be closed to signal that the payload has been discarded. This is best done by adding the connection: close header to the response.

Note that node.js clients might not actually be able to handle such a response right now, due to nodejs/node#12339.

@hueniverse hueniverse self-assigned this May 29, 2017
@hueniverse hueniverse added this to the 16.2.0 milestone May 29, 2017
@hueniverse hueniverse merged commit c212bc8 into hapijs:master May 29, 2017
1 of 2 checks passed
@Marsup
Copy link
Contributor

@Marsup Marsup commented May 29, 2017

The test on this PR is flaky. I get a 400 Payload content length greater than maximum allowed: 11534336 about half the time. Looking at the test I don't see how that's possible, any idea ?

kanongil added a commit to kanongil/hapi that referenced this issue May 29, 2017
Marsup added a commit that referenced this issue May 30, 2017
@lock
Copy link

@lock lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants