nsimmons / koa-better-http-proxy

Proxy middleware for Koa. Based on villadora/express-http-proxy
Other
119 stars 42 forks source link

gzip error #18

Open EltonZhong opened 6 years ago

EltonZhong commented 6 years ago

[2018-09-06T02:53:18.863] [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 at decorateProxyResBody (/root/mockingbirds/65003/mockingbird/node_modules/koa-better-http-proxy/app/steps/decorateUserRes.js:44:22) at run (/root/mockingbirds/65003/mockingbird/node_modules/core-js/modules/es6.promise.js:75:22) at /root/mockingbirds/65003/mockingbird/node_modules/core-js/modules/es6.promise.js:92:30 at flush (/root/mockingbirds/65003/mockingbird/node_modules/core-js/modules/_microtask.js:18:9) at args.(anonymous function) (/root/.nvm/versions/node/v10.1.0/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:133:29) errno: -5, code: 'Z_BUF_ERROR' }

When proxying a request with data gziped , error occurs

jeremy-daley-kr commented 1 year ago

@EltonZhong I'm seeing the same when the byteLength is zero