proxy-chain
Advanced tools
Comparing version 0.1.19 to 0.1.20
@@ -147,9 +147,9 @@ 'use strict'; | ||
for (var i = 0; i < response.rawHeaders.length; i += 2) { | ||
var headerName = response.rawHeaders[i]; | ||
var headerValue = response.rawHeaders[i + 1]; | ||
var name = response.rawHeaders[i]; | ||
var value = response.rawHeaders[i + 1]; | ||
if ((0, _tools.isHopByHopHeader)(headerName)) continue; | ||
if ((0, _tools.isInvalidHeader)(headerName)) continue; | ||
if ((0, _tools.isHopByHopHeader)(name)) continue; | ||
if ((0, _tools.isInvalidHeader)(name, value)) continue; | ||
(0, _tools.addHeader)(headers, headerName, headerValue); | ||
(0, _tools.addHeader)(headers, name, value); | ||
} | ||
@@ -156,0 +156,0 @@ |
@@ -54,5 +54,7 @@ 'use strict'; | ||
var isInvalidHeader = exports.isInvalidHeader = function isInvalidHeader(header) { | ||
// NOTE: These are internal Node.js APIs, they might stop working in the future! | ||
return typeof header !== 'string' || !header || !(0, _http_common._checkIsHttpToken)(header) || (0, _http_common._checkInvalidHeaderChar)(header); | ||
// This code is based on Node.js' validateHeader() function from _http_outgoing.js module | ||
// (see https://github.com/nodejs/node/blob/189d29f39e6de9ccf10682bfd1341819b4a2291f/lib/_http_outgoing.js#L485) | ||
var isInvalidHeader = exports.isInvalidHeader = function isInvalidHeader(name, value) { | ||
// NOTE: These are internal Node.js functions, they might stop working in the future! | ||
return typeof name !== 'string' || !name || !(0, _http_common._checkIsHttpToken)(name) || value === undefined || (0, _http_common._checkInvalidHeaderChar)(value); | ||
}; | ||
@@ -59,0 +61,0 @@ |
@@ -0,1 +1,5 @@ | ||
0.1.20 / 2018-01-26 | ||
================== | ||
- Fixed "TypeError: The header content contains invalid characters" bug | ||
0.1.19 / 2018-01-25 | ||
@@ -2,0 +6,0 @@ ================== |
{ | ||
"name": "proxy-chain", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84134
1278