MCPcopy Index your code
hub / github.com/nodejs/node / checkInvalidHeaderChar

Function checkInvalidHeaderChar

lib/_http_common.js:281–284  ·  view source on GitHub ↗

* True if val contains an invalid header value character. * By default uses strict validation per RFC 7230. * When lenient=true, uses relaxed validation per Fetch spec. * @param {string} val * @param {boolean} [lenient] - Use lenient validation (Fetch spec rules) * @returns {boolean}

(val, lenient = false)

Source from the content-addressed store, hash-verified

279 * @returns {boolean}
280 */
281function checkInvalidHeaderChar(val, lenient = false) {
282 const regex = lenient ? lenientHeaderCharRegex : strictHeaderCharRegex;
283 return regex.test(val);
284}
285
286function cleanParser(parser) {
287 parser._headers = [];

Callers 4

_http_outgoing.jsFile · 0.85
_http_server.jsFile · 0.85
writeHeadFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…