mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
RequestServer: Don't update Content-Length during cache revalidation
We were treating Content-Type as exempt from header updates during cache revalidation and incorrectly allowing Content-Length to get overwritten when handling an HTTP 304 response. This caused cached entries to end up with a mismatched Content-Length that described the validating response instead of the stored body.
This commit is contained in:
parent
0311d40425
commit
880a7e6c2a
Notes:
github-actions[bot]
2025-11-15 15:08:53 +00:00
Author: https://github.com/awesomekling
Commit: 880a7e6c2a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6830
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 1 additions and 1 deletions
|
|
@ -278,7 +278,7 @@ void update_header_fields(HTTP::HeaderMap& stored_headers, HTTP::HeaderMap const
|
|||
// * Header fields that are automatically processed and removed by the recipient, as described below, and
|
||||
|
||||
// * The Content-Length header field.
|
||||
if (name.equals_ignoring_ascii_case("Content-Type"sv))
|
||||
if (name.equals_ignoring_ascii_case("Content-Length"sv))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue