Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
url: fix file state clarification in binding
The state of query and fragment in file state
clarification should be adjusted after the state of
the path is confirmed.

Applicable cases:
+ `file:#foo` => `file:///#foo`
+ `file:?bar` => `file:///?bar`

Fixes: #10978
  • Loading branch information
watilde committed Feb 13, 2017
commit a723caa509e56b8c904d1fe42d99285c77ef723f
4 changes: 2 additions & 2 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,8 @@ namespace url {
}
SET_HAVE_QUERY()
state = kQuery;
break;
}
break;
case '#':
if (base_is_file) {
if (DOES_HAVE_HOST(base)) {
Expand All @@ -1109,8 +1109,8 @@ namespace url {
url.query = base.query;
}
state = kFragment;
break;
}
break;
default:
if (base_is_file &&
(!WINDOWS_DRIVE_LETTER(ch, p[1]) ||
Expand Down