diff --git a/lib/fetch/util.js b/lib/fetch/util.js index 4a03ad2af59..4d21e2e17b9 100644 --- a/lib/fetch/util.js +++ b/lib/fetch/util.js @@ -146,13 +146,7 @@ function isValidHeaderName (potentialValue) { return false } - for (const char of potentialValue) { - if (!isValidHTTPToken(char)) { - return false - } - } - - return true + return isValidHTTPToken(potentialValue) } /**