diff --git a/lib/node-http-proxy/http-proxy.js b/lib/node-http-proxy/http-proxy.js index 35ddb3d..6c77ac6 100644 --- a/lib/node-http-proxy/http-proxy.js +++ b/lib/node-http-proxy/http-proxy.js @@ -210,6 +210,11 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) { else { response.headers.connection = 'close' } } + // Remove `Transfer-Encoding` header if client's protocol is HTTP/1.0 + if (req.httpVersion === '1.0') { + delete response.headers['transfer-encoding']; + } + // Set the headers of the client response res.writeHead(response.statusCode, response.headers);