diff --git a/lib/requestHandler.js b/lib/requestHandler.js index 4940782..be501a7 100644 --- a/lib/requestHandler.js +++ b/lib/requestHandler.js @@ -21,7 +21,7 @@ function userRequestHandler(req,userRes){ var host = req.headers.host, protocol = (!!req.connection.encrypted && !/^http:/.test(req.url)) ? "https" : "http", - fullUrl = protocol + '://' + host + req.url, + fullUrl = protocol === "http" ? req.url : (protocol + '://' + host + req.url), urlPattern = url.parse(fullUrl), path = urlPattern.path, resourceInfo,