http-proxy
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -80,3 +80,3 @@ var common = exports, | ||
} | ||
return outgoing; | ||
@@ -137,8 +137,28 @@ }; | ||
common.urlJoin = function() { | ||
var args = Array.prototype.slice.call(arguments); | ||
// | ||
// We do not want to mess with the query string. All we want to touch is the path. | ||
// | ||
var args = Array.prototype.slice.call(arguments), | ||
lastIndex = args.length - 1, | ||
last = args[lastIndex], | ||
lastSegs = last.split('?'), | ||
retSegs; | ||
args[lastIndex] = lastSegs[0]; | ||
// | ||
// Join all strings, but remove empty strings so we don't get extra slashes from | ||
// joining e.g. ['', 'am'] | ||
return args.filter(function filter(a) { | ||
return !!a; | ||
}).join('/').replace(/\/+/g, '/'); | ||
// | ||
retSegs = [ | ||
args.filter(function filter(a) { | ||
return !!a; | ||
}).join('/').replace(/\/+/g, '/') | ||
]; | ||
// Only join the query string if it exists so we don't have trailing a '?' | ||
// on every request | ||
lastSegs[1] && retSegs.push(lastSegs[1]); | ||
return retSegs.join('?') | ||
}; |
{ | ||
"name" : "http-proxy", | ||
"version" : "1.6.1", | ||
"version" : "1.6.2", | ||
@@ -5,0 +5,0 @@ "repository" : { |
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
35103
668