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
Compression returns (invalid) Content-Length which hangs HTTP connections. #6
Comments
PR welcome, but IMO |
Also, @wrr if you are going to make a PR, please create a new test that fails, rather than modifying an existing test. |
@wrr Any middleware cannot process things that further middleware does. Your breaking example will always fail. (not the repurposed the unit test) Furthermore, I have seen the use of |
|
Oh. I'm wrong. We actually overwrite We only call node's writeHead after everything else, is an issue? As far as I can tell, we aren't breaking it. |
In my example, if you remove compression middleware, the example works fine, if you add the middleware, it returns invalid response. This means that the middleware does not support |
Of course |
My expectations are the same as with Are you arguing that there is no bug? My impression was that @jonathanong acknowledged the bug, but pointed that he isn't in favor of supporting 'writeHead` API. |
I'm going with: I do not understand this enough and someone else will probably have to fix it. Apologies. |
This thread is soo annoying. It's fixed now, you're welcome. |
updated the dependencies to their latest versions
The middleware does not process and modify headers that are passed as arguments to the
writeHead()
function. If theContent-Length
is passed to thewriteHead()
, it is returned unaltered, with a value that after compression is invalid.A breaking example:
This returns following headers:
A failing unit test
There are other related issues caused by the same bug. Following headers are incorrectly processed if they are passed to the
writeHead
function:Vary
,Content-Type
,Content-Encoding
.The text was updated successfully, but these errors were encountered: