Skip to content

Commit ca76f18

Browse files
remove content-length header to avoid conflict with transfer-encoding
1 parent fc47320 commit ca76f18

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/proxy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ Proxy.prototype._onHttpServerRequest = function(isSSL, clientToProxyRequest, pro
702702
return self._onError('ON_RESPONSE_ERROR', ctx, err);
703703
}
704704
ctx.serverToProxyResponse.headers['transfer-encoding'] = 'chunked';
705+
delete ctx.serverToProxyResponse.headers['content-length'];
705706
ctx.serverToProxyResponse.headers['connection'] = 'close';
706707
return self._onResponseHeaders(ctx, function (err) {
707708
if (err) {

0 commit comments

Comments
 (0)