Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 6bd0793

Browse files
authored
Merge pull request #21 from ntrpy/master
Fix for joining relative requests in windows
2 parents a750bdf + 64a8076 commit 6bd0793

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/join.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function join(path, request) {
88
if(absoluteWinRegExp.test(request)) return normalize(request.replace(/\//g, "\\"));
99
if(absoluteNixRegExp.test(request)) return normalize(request);
1010
if(path == "/") return normalize(path + request);
11-
if(absoluteWinRegExp.test(path)) return normalize(path + "\\" + request.replace(/\//g, "\\"));
11+
if(absoluteWinRegExp.test(path)) return normalize(path.replace(/\//g, "\\") + "\\" + request.replace(/\//g, "\\"));
1212
if(absoluteNixRegExp.test(path)) return normalize(path + "/" + request);
1313
return normalize(path + "/" + request);
1414
};

0 commit comments

Comments
 (0)