diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index 6e2b9ab97d..3768ff8e89 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -391,14 +391,14 @@ static bool is_forbidden_method(String const& method) // https://fetch.spec.whatwg.org/#concept-method static bool is_method(String const& method) { - Regex regex { R"~~~(^[A-Za-z0-9!#$%&'*+-.^_`|~]+$)~~~" }; + Regex regex { R"~~~(^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$)~~~" }; return regex.has_match(method); } // https://fetch.spec.whatwg.org/#header-name static bool is_header_name(String const& header_name) { - Regex regex { R"~~~(^[A-Za-z0-9!#$%&'*+-.^_`|~]+$)~~~" }; + Regex regex { R"~~~(^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$)~~~" }; return regex.has_match(header_name); }