mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] style changes
This commit is contained in:
parent
eb95660822
commit
7c5e40a429
@ -133,17 +133,21 @@ common.getPort = function(req) {
|
||||
*/
|
||||
|
||||
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 lastIndex = args.length-1;
|
||||
var last = args[lastIndex]
|
||||
var lastSegs = last.split('?')
|
||||
args[lastIndex] = lastSegs[0]
|
||||
//
|
||||
// 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('?'),
|
||||
args[lastIndex] = lastSegs[0],
|
||||
retSegs;
|
||||
|
||||
//
|
||||
// Join all strings, but remove empty strings so we don't get extra slashes from
|
||||
// joining e.g. ['', 'am']
|
||||
var retSegs = [
|
||||
//
|
||||
retSegs = [
|
||||
args.filter(function filter(a) {
|
||||
return !!a;
|
||||
}).join('/').replace(/\/+/g, '/')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user