LibHTTP: Trim the whitespace around the Transfer-Encoding header value
Fixes #6302.
This commit is contained in:
parent
5da4c9bf1e
commit
339ae7873e
Notes:
sideshowbarker
2024-07-18 20:24:13 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/339ae7873e7 Pull-request: https://github.com/SerenityOS/serenity/pull/6309 Issue: https://github.com/SerenityOS/serenity/issues/6302
1 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,8 @@ void Job::on_socket_connected()
|
|||
} else {
|
||||
auto transfer_encoding = m_headers.get("Transfer-Encoding");
|
||||
if (transfer_encoding.has_value()) {
|
||||
auto encoding = transfer_encoding.value();
|
||||
// Note: Some servers add extra spaces around 'chunked', see #6302.
|
||||
auto encoding = transfer_encoding.value().trim_whitespace();
|
||||
|
||||
dbgln_if(JOB_DEBUG, "Job: This content has transfer encoding '{}'", encoding);
|
||||
if (encoding.equals_ignoring_case("chunked")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue