mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
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:
parent
bfc9dc447f
commit
2c918b540d
Notes:
sideshowbarker
2024-07-17 03:35:16 +09:00
Author: https://github.com/awesomekling
Commit: 2c918b540d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/658
Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue