We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b309db0 commit 7ec9b70Copy full SHA for 7ec9b70
index.js
@@ -42,7 +42,7 @@ function parse(str) {
42
43
// If the host is missing it might be a URL-encoded path to a socket.
44
var pathname = result.pathname;
45
- if (!config.host && pathname && pathname.toLowerCase().startsWith('%2f')) {
+ if (!config.host && pathname && /^%2f/i.test(pathname)) {
46
var pathnameSplit = pathname.split('/');
47
config.host = decodeURIComponent(pathnameSplit[0]);
48
pathname = pathnameSplit.splice(1).join('/');
0 commit comments