Skip to content

Commit 50be686

Browse files
committed
Consider null protocol as missing protocol, not an unsupported one.
When the URL is just a relative path, as in /blah/bleh, at least in v0.12.7, url.protocol is not set at all, thus, it’s null.
1 parent 17b03f9 commit 50be686

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/XMLHttpRequest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ exports.XMLHttpRequest = function() {
284284
break;
285285

286286
case undefined:
287+
case null:
287288
case "":
288289
host = "localhost";
289290
break;

0 commit comments

Comments
 (0)