Skip to content

Commit 9c2bed4

Browse files
committed
fixup! url: prevent pathname setter from erasing path of path-only URLs
1 parent 143d369 commit 9c2bed4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_url.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ void URL::Parse(const char* input,
14771477
if (ch != '/') {
14781478
continue;
14791479
}
1480-
} else if (has_state_override && url->host.empty()) {
1480+
} else if (has_state_override && !(url->flags & URL_FLAGS_HAS_HOST)) {
14811481
url->path.emplace_back("");
14821482
}
14831483
break;

0 commit comments

Comments
 (0)