From ed73f06ed307ad2204e565781cc3154047941a8c Mon Sep 17 00:00:00 2001 From: Jarrett Cruger Date: Fri, 12 Sep 2014 07:50:16 -0400 Subject: [PATCH] [fix] ensure path works on windows because path.join doesnt like URLs --- lib/http-proxy/common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js index 670a0e3..05ed6e1 100644 --- a/lib/http-proxy/common.js +++ b/lib/http-proxy/common.js @@ -1,5 +1,4 @@ var common = exports, - path = require('path'), url = require('url'), extend = require('util')._extend; @@ -72,7 +71,9 @@ common.setupOutgoing = function(outgoing, options, req, forward) { ? url.parse(req.url).path : req.url; - outgoing.path = path.join(targetPath, outgoingPath); + outgoing.path = targetPath + ? targetPath + '/' + outgoingPath + : outgoingPath; return outgoing; };