Repository navigation
Commit fbd3e2c
committed
Answer 501 to a request with a transfer coding besides chunked
A request whose Transfer-Encoding ended in chunked but listed more
(another coding before chunked, or chunked twice) was read with only
the chunked framing removed, so the handler got a body still in the
other coding. RFC 9112 6.1 lets a server answer 501 to a transfer
coding it does not implement. The server now accepts only a single
Transfer-Encoding field whose value is chunked, as Go and nginx do,
and answers any other list ending in chunked with 501 and closes the
connection. A list whose final coding is not chunked still gets 400.1 parent 32a0ca8 commit fbd3e2c
2 files changed
Lines changed: 39 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15135 | 15135 | | |
15136 | 15136 | | |
15137 | 15137 | | |
| 15138 | + | |
| 15139 | + | |
| 15140 | + | |
| 15141 | + | |
| 15142 | + | |
| 15143 | + | |
| 15144 | + | |
| 15145 | + | |
| 15146 | + | |
| 15147 | + | |
15138 | 15148 | | |
15139 | 15149 | | |
15140 | 15150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30108 | 30108 | | |
30109 | 30109 | | |
30110 | 30110 | | |
| 30111 | + | |
30111 | 30112 | | |
30112 | | - | |
30113 | | - | |
30114 | | - | |
30115 | | - | |
30116 | | - | |
30117 | | - | |
30118 | | - | |
| 30113 | + | |
| 30114 | + | |
| 30115 | + | |
| 30116 | + | |
| 30117 | + | |
30119 | 30118 | | |
30120 | | - | |
30121 | | - | |
30122 | | - | |
| 30119 | + | |
| 30120 | + | |
| 30121 | + | |
| 30122 | + | |
| 30123 | + | |
| 30124 | + | |
| 30125 | + | |
| 30126 | + | |
| 30127 | + | |
30123 | 30128 | | |
30124 | | - | |
30125 | | - | |
30126 | | - | |
30127 | | - | |
30128 | | - | |
30129 | | - | |
30130 | | - | |
30131 | | - | |
| 30129 | + | |
| 30130 | + | |
| 30131 | + | |
| 30132 | + | |
| 30133 | + | |
| 30134 | + | |
30132 | 30135 | | |
30133 | | - | |
30134 | | - | |
30135 | | - | |
30136 | | - | |
| 30136 | + | |
| 30137 | + | |
| 30138 | + | |
| 30139 | + | |
| 30140 | + | |
| 30141 | + | |
| 30142 | + | |
| 30143 | + | |
30137 | 30144 | | |
30138 | 30145 | | |
30139 | 30146 | | |
| |||
0 commit comments