Skip to content

Commit

Permalink
url: empty file URL should be parsed correctly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
watilde committed Feb 13, 2017
1 parent b47f916 commit e39218b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,10 @@ namespace url {
SET_HAVE_QUERY()
url.query = base.query;
}
break;
}
break;
state = kPath;
continue;
case '\\':
case '/':
state = kFileSlash;
Expand Down

0 comments on commit e39218b

Please sign in to comment.