-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Abort response on stream error mid-response #2121
Comments
Not worth the complexity. |
Hi ! Just in case, is this behaviour still complex to fix ? It's easy to mitigate the first, by testing the file existence, but I don't see any possibility to do the second. Thanks in advance for your time ! |
No easy solution. Once you start piping the stream, you already set the status code. |
Facing the same issue, it seems adding Line 268 in 513cea8
|
Forcefully closing the socket is the only, and best, option there is. This is probably something that hapi should do already. Otherwise, the client will just wait for data that is never coming. Worse, if it is a http keep-alive request, it can have pending pipelined requests that will never be fulfilled. The client should be able to deduce that it received a partial response, and handle it however it sees fit. |
If a 200 response using a stream fails, the client will get an incomplete 200 response instead of a complete 500.
The text was updated successfully, but these errors were encountered: