-
Notifications
You must be signed in to change notification settings - Fork 42
Fix that some response cause decompress fail #19
base: master
Are you sure you want to change the base?
Conversation
Just had a look into this. I found traces of the problem from 2004 and indeed, |
@keymandll I know that it's definitely not working perfectly fine in my case, where a |
@jeremy-daley-kr It's been a while since I had a look into this so I did another round of testing again and was playing around with the I'm using Node Anyway, I'd love to see that raw HTTP HEAD response if you could share it, please. |
@keymandll I really don't think Node version is of consequence. Can you please check my PR here: #54 If you remove the |
@jeremy-daley-kr You don't think or do you know for sure? The reason why I asked for your node version and the version of On a side note: I'm not a maintainer of this lib, I have my own copy I use and maintain. This is why I'm interested in this. |
@keymandll I appreciate the interest and feedback. The I'm trying to prove out the test, 'cause I'm obviously seeing the error... I'm just more familiar with Jest than I am mocha =/ |
Update. While I'm still unable to reproduce with HEAD requests, I could reproduce with a GET request. So, a raw HTTP response example to a GET request that could trigger the issue was:
|
@keymandll I just updated my test btw. Took me a minute to figure out |
@jeremy-daley-kr I was also looking into it as the tests needed some changes to work as expected. Anyway, as things are not moving with this project, I applied the fix and wrote the test for my fork of the library. If you are interested, you can find the: Source at: https://gitlab.com/Keymandll/koa-even-better-http-proxy |
[2018-09-07T12:27:17.742] [FATAL] mapping - { Error: unexpected end of file
at Zlib.zlibOnError [as onerror] (zlib.js:153:17)
at processChunkSync (zlib.js:481:12)
at zlibBufferSync (zlib.js:139:12)
at Object.gunzipSync (zlib.js:695:14)
at /root/mockingbirds/65003/mockingbird/node_modules/koa-better-http-proxy/app/steps/decorateUserRes.js:12:46
Due to this problem.