http-party / node-http-proxy

A full-featured http proxy for node.js
https://github.com/http-party/node-http-proxy
Other
13.91k stars 1.97k forks source link

Gunzip.zlibOnError #1217

Open amingilani opened 6 years ago

amingilani commented 6 years ago

I operate a reverse proxy for an upstream site. We've increasingly started running into this error:

events.js:183 
      throw er; // Unhandled 'error' event 
       ^ 
 Error: unexpected end of file 
     at Gunzip.zlibOnError (zlib.js:153:15) 
 npm ERR! code ELIFECYCLE 
 npm ERR! errno 1 
 npm ERR! planet-amazon@2.1.3 start: `node dist/proxy.js` 
 npm ERR! Exit status 1 
 npm ERR!  
 npm ERR! Failed at the planet-amazon@2.1.3 start script. 
 npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

At this point, my app crashes.

I understand that this might be an incorrect response from upstream, but it shouldn't cause the proxy to crash outright. Shouldn't this error be handled in some way?

I have no control over the upstream site since I'm reverse proxying it with a few additional tweaks as required by our business logic.

If you want to see my app running in production, go here

amingilani commented 6 years ago

bump

tobinski commented 6 years ago

Same here. Did you find a solution?