-
Notifications
You must be signed in to change notification settings - Fork 15
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
HEAD requests cause "unexpected end of file" from gzip decoder #70
Comments
Is this on HTTP 2? |
yes. HEAD requests don't have a body, but it appears the use of stream.pipe() in the StreamResponse() constructor. However, when the h2stream is completed, the stream pipe is closed. However, because there is a content-length header from the head response, the Response.setBody() function assumes that there is more stream to decode thus tripping over zlib's internal problems of being able to handle the broken chunks without resorting to There are a few solutions as I see it:
With this in mind, I might suggest adding the |
I am experiencing this issue as well. Was there any decision on the path forward for a fix? I'd gladly write it up and send a pull request but I want to make sure I don't go down a dead end. |
I have a PR for this here: #72 |
It appears HEAD requests cause the gzip decoder to throw an 'unexpected end of file' error. This is likely because the HEAD has a Content-Length but no body frame.
The text was updated successfully, but these errors were encountered: