simple-http-proxy
Advanced tools
Comparing version
@@ -103,4 +103,11 @@ | ||
// The headers have already been sent so we can't actually respond to this request | ||
if (res.headersSent) { | ||
res.end(); | ||
return request.abort(); | ||
} | ||
// Send down the statusCode and headers | ||
debug('sending head', response.statusCode, response.headers); | ||
res.writeHead(response.statusCode, response.headers); | ||
@@ -116,3 +123,2 @@ | ||
// Clean up the socket | ||
// TODO is there a better way to do this? There's a 'socket hang up' error being emitted... | ||
request.setSocketKeepAlive(false); | ||
@@ -119,0 +125,0 @@ request.socket.destroy(); |
{ | ||
"name": "simple-http-proxy", | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"description": "Simple proxy middleware", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
8434
0.97%202
2.02%