(httpValidation, insecureHTTPParserOption)
| 315 | } |
| 316 | |
| 317 | function 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 | |
| 330 | module.exports = { |
| 331 | _checkInvalidHeaderChar: checkInvalidHeaderChar, |
no test coverage detected
searching dependent graphs…