diff options
Diffstat (limited to 'ext/fetch/23_request.js')
-rw-r--r-- | ext/fetch/23_request.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index 4c46ebe75..daf77a834 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -36,7 +36,7 @@ const { ArrayPrototypeSplice, ObjectKeys, ObjectPrototypeIsPrototypeOf, - RegExpPrototypeTest, + RegExpPrototypeExec, StringPrototypeStartsWith, Symbol, SymbolFor, @@ -227,7 +227,7 @@ function validateAndNormalizeMethod(m) { } // Regular path - if (!RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, m)) { + if (RegExpPrototypeExec(HTTP_TOKEN_CODE_POINT_RE, m) === null) { throw new TypeError("Method is not valid."); } const upperCase = byteUpperCase(m); |