[fix] ensure path works on windows because path.join doesnt like URLs

This commit is contained in:
Jarrett Cruger 2014-09-12 07:50:16 -04:00
parent d5c656bceb
commit ed73f06ed3

View File

@ -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;
};