mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
LibWeb/XHR: Use normalized header value when validating contents
This was not matching specification and caused valid requests to be rejected.
This commit is contained in:
parent
f5c551a491
commit
3e049cd954
1 changed files with 1 additions and 1 deletions
|
@ -433,7 +433,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::set_request_header(String const& name_
|
|||
// 4. If name is not a header name or value is not a header value, then throw a "SyntaxError" DOMException.
|
||||
if (!Fetch::Infrastructure::is_header_name(name))
|
||||
return WebIDL::SyntaxError::create(realm, "Header name contains invalid characters."_string);
|
||||
if (!Fetch::Infrastructure::is_header_value(value))
|
||||
if (!Fetch::Infrastructure::is_header_value(normalized_value))
|
||||
return WebIDL::SyntaxError::create(realm, "Header value contains invalid characters."_string);
|
||||
|
||||
auto header = Fetch::Infrastructure::Header {
|
||||
|
|
Loading…
Reference in a new issue