forwardemail / forwardemail/superagent
Request hang when statusCode=204 and content-encoding = gzip
- Dominant language
- JavaScript
- Stars
- 16.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
In my test, I have below request
Response 204- no content
but in the header I have
`content-encoding: gzip`
`transfer-encoding: chunked`
I know that is the invalid header for 204 but this is not in my control,
In this case, my code keeps hanging forever without any error
My proposal is if the response is 204 and the incoming stream is empty, we can ignore the gzip
Note: I tested the same request with the postman and got a successful response with an empty body
Working:

Not working:

After many test, I can confirm when `transfer-encoding: chunked` and status=204 it will cause this issue.
Contributor guide
Assessment
This issue has not been assessed yet.