Skip to content

Commit

Permalink
[fix] refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Jun 12, 2013
1 parent adb6763 commit 405cc45
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/node-http-proxy/proxy-stream.js
Expand Up @@ -86,11 +86,10 @@ ProxyStream.prototype.start = function (req) {
//
// Process the `pReq` `pRes` when it's received.
//
if (req.httpVersion === '1.0') {
pRes.headers.connection = req.headers.connection || 'close';
} else if (!pRes.headers.connection) {
pRes.headers.connection = req.headers.connection || 'keep-alive';
}
(req.httpVersion === '1.0' || !pRes.headers.connection)
&& pRes.headers.connection = req.headers.connection
|| (req.httpVersion === '1.0' ? 'close' : 'keep-alive');


// Remove `Transfer-Encoding` header if client's protocol is HTTP/1.0
// or if this is a DELETE request with no content-length header.
Expand Down

0 comments on commit 405cc45

Please sign in to comment.