LibWeb: Encode URL in ResourceLoader::load()
Encode URLs before requesting them - this fixes loading of resources that have spaces in their URL, for example.
This commit is contained in:
parent
254e010c75
commit
7ab8be9e0b
Notes:
sideshowbarker
2024-07-18 19:14:23 +09:00
Author: https://github.com/danners 🔰 Commit: https://github.com/SerenityOS/serenity/commit/7ab8be9e0bc Pull-request: https://github.com/SerenityOS/serenity/pull/6557
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ void ResourceLoader::load(const LoadRequest& request, Function<void(ReadonlyByte
|
|||
headers.set(it.key, it.value);
|
||||
}
|
||||
|
||||
auto download = protocol_client().start_download(request.method(), url.to_string(), headers, request.body());
|
||||
auto download = protocol_client().start_download(request.method(), url.to_string_encoded(), headers, request.body());
|
||||
if (!download) {
|
||||
if (error_callback)
|
||||
error_callback("Failed to initiate load", {});
|
||||
|
|
Loading…
Add table
Reference in a new issue