summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorSimon Danner <danners@users.noreply.github.com>2021-04-22 20:45:59 +0200
committerGitHub <noreply@github.com>2021-04-22 20:45:59 +0200
commit7ab8be9e0bcecdfb5e994322a4958b0d11ff10f6 (patch)
treee4194b677ae288c75e7e4669035f9d694a65ddea /Userland/Libraries/LibWeb/Loader
parent254e010c7542c09224310b11af5eaf4139a3f028 (diff)
downloadserenity-7ab8be9e0bcecdfb5e994322a4958b0d11ff10f6.zip
LibWeb: Encode URL in ResourceLoader::load()
Encode URLs before requesting them - this fixes loading of resources that have spaces in their URL, for example.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
index b5b561f4e8..5331d1bb53 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
@@ -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", {});