Socket
Socket
Sign inDemoInstall

http-proxy

Package Overview
Dependencies
Maintainers
5
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-proxy - npm Package Compare versions

Comparing version 0.8.5 to 0.8.6

benchmark/websockets-throughput.js

56

lib/node-http-proxy/http-proxy.js

@@ -259,2 +259,27 @@ /*

//
// When the `reverseProxy` `response` ends, end the
// corresponding outgoing `res` unless we have entered
// an error state. In which case, assume `res.end()` has
// already been called and the 'error' event listener
// removed.
//
var ended = false;
response.on('close', function () {
if (!ended) { response.emit('end') }
});
response.on('end', function () {
ended = true;
if (!errState) {
reverseProxy.removeListener('error', proxyError);
try { res.end() }
catch (ex) { console.error("res.end error: %s", ex.message) }
// Emit the `end` event now that we have completed proxying
self.emit('end', req, res);
}
});
// Set the headers of the client response

@@ -287,27 +312,2 @@ res.writeHead(response.statusCode, response.headers);

res.on('drain', ondrain);
//
// When the `reverseProxy` `response` ends, end the
// corresponding outgoing `res` unless we have entered
// an error state. In which case, assume `res.end()` has
// already been called and the 'error' event listener
// removed.
//
var ended = false;
response.on('close', function () {
if (!ended) { response.emit('end') }
});
response.on('end', function () {
ended = true;
if (!errState) {
reverseProxy.removeListener('error', proxyError);
try { res.end() }
catch (ex) { console.error("res.end error: %s", ex.message) }
// Emit the `end` event now that we have completed proxying
self.emit('end', req, res);
}
});
});

@@ -319,2 +319,5 @@

reverseProxy.once('error', proxyError);
reverseProxy.once('socket', function (socket) {
socket.once('error', proxyError);
});

@@ -730,2 +733,5 @@ //

reverseProxy.on('error', proxyError);
reverseProxy.once('socket', function (socket) {
socket.once('error', proxyError);
});

@@ -732,0 +738,0 @@ try {

{
"name": "http-proxy",
"version": "0.8.5",
"version": "0.8.6",
"description": "A full-featured http reverse proxy for node.js",

@@ -28,5 +28,5 @@ "author": "Nodejitsu Inc. <info@nodejitsu.com>",

"async": "0.1.x",
"socket.io": "0.9.6",
"socket.io-client": "0.9.6",
"ws": "0.4.21"
"socket.io": "0.9.11",
"socket.io-client": "0.9.11",
"ws": "0.4.23"
},

@@ -33,0 +33,0 @@ "main": "./lib/node-http-proxy",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc