Commit 152d258e authored by koichik's avatar koichik Committed by Charlie McConnell

[fix] Avoid `Transfer-Encoding: chunked` for HTTP/1.0 client, closes #59.

parent c98ccb40
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment