| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7c7180a commit a38ad07
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,7 @@ const { | |||
| 11 | 11 | ObjectPrototypeHasOwnProperty, | |
| 12 | 12 | ReflectApply, | |
| 13 | 13 | ReflectGetPrototypeOf, | |
| 14 | + StringPrototypeIncludes, | ||
| 14 | 15 | StringPrototypeToLowerCase, | |
| 15 | 16 | StringPrototypeTrim, | |
| 16 | 17 | Symbol, | |
@@ -81,7 +82,9 @@ let statusConnectionHeaderWarned = false; | |||
| 81 | 82 | // close as possible to the current require('http') API | |
| 82 | 83 | ||
| 83 | 84 | const assertValidHeader = hideStackFrames((name, value) => { | |
| 84 | - if (name === '' || typeof name !== 'string' || name.indexOf(' ') >= 0) { | ||
| 85 | + if (name === '' || | ||
| 86 | + typeof name !== 'string' || | ||
| 87 | + StringPrototypeIncludes(name, ' ')) { | ||
| 85 | 88 | throw new ERR_INVALID_HTTP_TOKEN('Header name', name); | |
| 86 | 89 | } | |
| 87 | 90 | if (isPseudoHeader(name)) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments