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

Function calculateLenientFlags

lib/_http_common.js:317–328  ·  view source on GitHub ↗
(httpValidation, insecureHTTPParserOption)

Source from the content-addressed store, hash-verified

315}
316
317function calculateLenientFlags(httpValidation, insecureHTTPParserOption) {
318 if (httpValidation === 'strict') {
319 return HTTPParser.kLenientNone | 0;
320 } else if (httpValidation === 'relaxed') {
321 return HTTPParser.kLenientHeaderValueRelaxed | 0;
322 } else if (httpValidation === 'insecure') {
323 return HTTPParser.kLenientAll | 0;
324 }
325 const lenient = insecureHTTPParserOption === undefined ?
326 isLenient() : insecureHTTPParserOption;
327 return lenient ? HTTPParser.kLenientAll | 0 : HTTPParser.kLenientNone | 0;
328}
329
330module.exports = {
331 _checkInvalidHeaderChar: checkInvalidHeaderChar,

Callers 2

tickOnSocketFunction · 0.85

Calls 1

isLenientFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…