MCPcopy Index your code
hub / github.com/node-modules/utility / includesInvalidHttpHeaderChar

Function includesInvalidHttpHeaderChar

src/string.ts:120–132  ·  view source on GitHub ↗
(val: string)

Source from the content-addressed store, hash-verified

118 * Detect invalid http header characters in a string
119 */
120export function includesInvalidHttpHeaderChar(val: string) {
121 if (!val || typeof val !== 'string') {
122 return false;
123 }
124
125 for (let i = 0; i < val.length; ++i) {
126 if (!validHdrChars[val.charCodeAt(i)]) {
127 return true;
128 }
129 }
130
131 return false;
132}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…