MCPcopy Create free account
hub / github.com/angular/dev-infra / isValidHTTPToken

Function isValidHTTPToken

github-actions/browserstack/set-browserstack-env.js:1552–1562  ·  view source on GitHub ↗
(characters)

Source from the content-addressed store, hash-verified

1550 }
1551 }
1552 function isValidHTTPToken(characters) {
1553 if (characters.length === 0) {
1554 return false;
1555 }
1556 for (let i = 0; i < characters.length; ++i) {
1557 if (!isTokenCharCode(characters.charCodeAt(i))) {
1558 return false;
1559 }
1560 }
1561 return true;
1562 }
1563 var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
1564 function isValidHeaderValue(characters) {
1565 return !headerCharRegex.test(characters);

Callers 3

constructorMethod · 0.70
processHeaderFunction · 0.70
constructorMethod · 0.70

Calls 1

isTokenCharCodeFunction · 0.70

Tested by

no test coverage detected