mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Avoid Transfer-Encoding: chunked for HTTP/1.0 client, closes #59.
This commit is contained in:
parent
c98ccb40e9
commit
152d258ea0
@ -210,6 +210,11 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
|||||||
else { response.headers.connection = 'close' }
|
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
|
// Set the headers of the client response
|
||||||
res.writeHead(response.statusCode, response.headers);
|
res.writeHead(response.statusCode, response.headers);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user