diff --git a/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index e0b3c127273..fd84dbf9a6f 100644 --- a/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -433,7 +433,7 @@ WebIDL::ExceptionOr 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 {