Skip to content

Commit

Permalink
fix 411 length required
Browse files Browse the repository at this point in the history
  • Loading branch information
xkxx committed Jun 7, 2013
1 parent f76d1ef commit f31893f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ var requestHandler = function(request, response, head) {
remoteRes.pipe(response);
});

// disable default Transfer-Encoding header
if (!reqObj.headers['transfer-encoding']) {
remoteReq.removeHeader('transfer-encoding');
}

// normally, browsers send CONNECT for ws: and wss:
// here we implement upgrade only for compatibility's sake
remoteReq.on('upgrade', function(remoteRes, remoteSoc) {
Expand Down

0 comments on commit f31893f

Please sign in to comment.