Repository navigation
Commit a90a82d
Test duplicate Host headers that the mismatch check misses (#1343)
* Test duplicate Host headers that the mismatch check misses
292a408 rejects a request header block with more than one Host header
(GHSA-6hr6-w5qg-qmwg), and 92b925e added a test case for it. That case
puts the mismatching Host last, so the older :authority/Host mismatch
check already rejects it: the test still passes with the new check
taken out.
Add two cases only the duplicate check catches: the matching Host
header last, and two Host headers with no :authority. Both are
accepted without the fix.
Assisted-by: Claude Code
* Assert the duplicate Host error message in the test
Move the duplicate Host header cases into their own list and add a
test that checks the ProtocolError says "Request header block has
multiple Host headers", so it fails if any other header check rejects
these blocks instead. The cases stay in the general invalid header
list too.
Assisted-by: Claude Code
---------
Co-authored-by: connabyss <connabyss.code@proton.me>1 parent 8380ac7 commit a90a82d
1 file changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | | - | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
91 | 120 | | |
92 | 121 | | |
93 | 122 | | |
| |||
0 commit comments