(val: string)
| 118 | * Detect invalid http header characters in a string |
| 119 | */ |
| 120 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…