Skip to content

Commit e39218b

Browse files
committed
url: empty file URL should be parsed correctly
An empty file URL `file:` should be parsed to `file:///` instead of `file://`. In the `kFile` state, the process was braked immediately when the ch is EOL, but it should work as `default` in the kFile state to adjust slashes.
1 parent b47f916 commit e39218b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/node_url.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,10 @@ namespace url {
10741074
SET_HAVE_QUERY()
10751075
url.query = base.query;
10761076
}
1077+
break;
10771078
}
1078-
break;
1079+
state = kPath;
1080+
continue;
10791081
case '\\':
10801082
case '/':
10811083
state = kFileSlash;

0 commit comments

Comments
 (0)