node-http-proxy-json
node-http-proxy-json copied to clipboard
Proxy hangs when processing large payload
The Gunzip stream has a default buffer of 16k. If the proxy response is larger that 16k, the stream hangs. The problem is that the unzip.write call returns false when the buffer is full, which causes the read to stop writing the the ServerResponse write method. The reader waits for the drain event on the response to continue, but it never comes, because it comes on the unzip object but is never redirected to the ServerResponse.