mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Do not move header name/values that are re-used
Fixes a regression from commit:
f675cfe90f
This commit is contained in:
parent
cbfae97101
commit
7b0dfa61b1
Notes:
github-actions[bot]
2025-11-27 02:23:40 +00:00
Author: https://github.com/trflynn89
Commit: 7b0dfa61b1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6949
5 changed files with 121 additions and 2 deletions
|
|
@ -247,7 +247,7 @@ WebIDL::ExceptionOr<void> Headers::append(Infrastructure::Header header)
|
|||
|
||||
// 2. If temporaryValue is null, then set temporaryValue to value.
|
||||
if (!temporary_value.has_value()) {
|
||||
temporary_value = move(value);
|
||||
temporary_value = value;
|
||||
}
|
||||
// 3. Otherwise, set temporaryValue to temporaryValue, followed by 0x2C 0x20, followed by value.
|
||||
else {
|
||||
|
|
@ -255,7 +255,7 @@ WebIDL::ExceptionOr<void> Headers::append(Infrastructure::Header header)
|
|||
}
|
||||
|
||||
auto temporary_header = Infrastructure::Header {
|
||||
.name = move(name),
|
||||
.name = name,
|
||||
.value = temporary_value.release_value(),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue