Commit 0c61bdd
net.http: reject END_STREAM on a 1xx response in H2Conn.read_response
A 1xx informational response is not final and must not end the stream
(RFC 9113 §8.1). The synchronous client discarded a 1xx HEADERS frame with a
bare `continue`, skipping the `if frame.end_stream { break }` handling, so a 1xx
carrying END_STREAM made read_response loop back to next_frame() and wait
forever for a final response the stream could no longer send — a malformed
server could hang the request instead of getting an error.
Reject END_STREAM in the 1xx interim branch, matching the mux path
(H2MuxConn.on_response_headers), which already rejects it. Found by Codex on
#27413.
Co-Authored-By: WOZCODE <contact@withwoz.com>1 parent a6884ce commit 0c61bdd
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
219 | 228 | | |
220 | 229 | | |
221 | 230 | | |
| |||
0 commit comments