(characters)
| 2280 | __name(isTokenCharCode, "isTokenCharCode"); |
| 2281 | var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; |
| 2282 | function isValidHTTPToken(characters) { |
| 2283 | if (characters.length >= 12) return tokenRegExp.test(characters); |
| 2284 | if (characters.length === 0) return false; |
| 2285 | for (let i = 0; i < characters.length; i++) { |
| 2286 | if (validTokenChars[characters.charCodeAt(i)] !== 1) { |
| 2287 | return false; |
| 2288 | } |
| 2289 | } |
| 2290 | return true; |
| 2291 | } |
| 2292 | __name(isValidHTTPToken, "isValidHTTPToken"); |
| 2293 | var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; |
| 2294 | function isValidHeaderValue(characters) { |
no test coverage detected
searching dependent graphs…