mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb+LibURL: Use URL paths directly for comparison
This matches the text of the spec a little more closely in many cases and is also more efficient than serializing the URL path.
This commit is contained in:
parent
ea68bdef26
commit
ffe070d7f9
Notes:
github-actions[bot]
2024-08-05 07:59:07 +00:00
Author: https://github.com/shannonbooth
Commit: ffe070d7f9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/966
5 changed files with 9 additions and 11 deletions
|
@ -799,7 +799,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> scheme_fetch(JS::Realm& r
|
|||
// a body.
|
||||
// NOTE: URLs such as "about:config" are handled during navigation and result in a network error in the context
|
||||
// of fetching.
|
||||
if (request->current_url().serialize_path() == "blank"sv) {
|
||||
if (request->current_url().paths().size() == 1 && request->current_url().paths()[0] == "blank"sv) {
|
||||
auto response = Infrastructure::Response::create(vm);
|
||||
response->set_status_message(MUST(ByteBuffer::copy("OK"sv.bytes())));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue