mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
AK: Unbreak parsing of file:// URLs with no host
We should still accept file:/// in the URL parser. :^)
This commit is contained in:
parent
27d1e7f432
commit
3422019e35
2 changed files with 25 additions and 1 deletions
|
@ -112,8 +112,14 @@ bool URL::parse(const StringView& string)
|
|||
buffer.append(consume());
|
||||
continue;
|
||||
}
|
||||
if (buffer.is_empty())
|
||||
if (buffer.is_empty()) {
|
||||
if (m_protocol == "file") {
|
||||
m_host = "";
|
||||
state = State::InPath;
|
||||
continue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
m_host = String::copy(buffer);
|
||||
buffer.clear();
|
||||
if (peek() == ':') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue