LibWeb+RequestServer: Let RequestServer set HTTP Accept-Encoding header

Ultimately it's RequestServer who knows which kind of encodings it can
handle and decompress, so let's have it set the Accept-Encoding.
This commit is contained in:
Andreas Kling 2024-07-16 10:21:31 +02:00 committed by Ali Mohammad Pur
commit 2c918b540d
Notes: sideshowbarker 2024-07-17 03:35:16 +09:00
2 changed files with 5 additions and 4 deletions

View file

@ -499,9 +499,6 @@ RefPtr<ResourceLoaderConnectorRequest> ResourceLoader::start_network_request(Loa
if (!headers.contains("User-Agent"))
headers.set("User-Agent", m_user_agent.to_byte_string());
if (!headers.contains("Accept-Encoding"))
headers.set("Accept-Encoding", "gzip, deflate, br");
auto protocol_request = m_connector->start_request(request.method(), request.url(), headers, request.body(), proxy);
if (!protocol_request) {
log_failure(request, "Failed to initiate load"sv);