Skip to content

Commit

Permalink
not setting connection header in case of http2 as it is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Niranjan Ojha authored and jcrugzz committed Oct 6, 2016
1 parent d0a1588 commit 2d01edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http-proxy/passes/web-outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var redirectRegex = /^201|30(1|2|7|8)$/;
function setConnection(req, res, proxyRes) {
if (req.httpVersion === '1.0') {
proxyRes.headers.connection = req.headers.connection || 'close';
} else if (!proxyRes.headers.connection) {
} else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) {
proxyRes.headers.connection = req.headers.connection || 'keep-alive';
}
},
Expand Down

0 comments on commit 2d01edc

Please sign in to comment.