LibWeb: Advertise to servers that we support gzip encoding

We've had gzip support for a while now, but it never really got
used because we never advertised it.
This commit is contained in:
Luke 2020-11-11 07:46:25 +00:00 committed by Andreas Kling
parent 397049aae8
commit 62a74bf282
Notes: sideshowbarker 2024-07-19 01:27:12 +09:00

View file

@ -158,6 +158,7 @@ void ResourceLoader::load(const LoadRequest& request, Function<void(const ByteBu
if (url.protocol() == "http" || url.protocol() == "https" || url.protocol() == "gemini") {
HashMap<String, String> headers;
headers.set("User-Agent", m_user_agent);
headers.set("Accept-Encoding", "gzip");
for (auto& it : request.headers()) {
headers.set(it.key, it.value);