Commit 756ac65
committed
http: fix crash for sync write errors during header parsing
Fix a crash that occurs when `parser.finish()` is called during
`parser.execute()`. In this particular case, this happened because
a 100 continue response is a place in which `.end()` can be called
which can in turn lead to a write error, which is emitted
synchronously, thus inside the outer `parser.execute()` call.
Resolve that by delaying the `parser.finish()` call until after
the `parser.execute()` call is done.
This only affects v12.x, because on later versions, errors are not
emitted synchronously.
PR-URL: #34251
Fixes: #15102
Fixes: #34016
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>1 parent 65b7bf4 commit 756ac65Copy full SHA for 756ac65
File tree
Expand file treeCollapse file tree
1 file changed
+6
-2
lines changedOpen diff view settings
Filter options
- lib
Expand file treeCollapse file tree
1 file changed
+6
-2
lines changedOpen diff view settings
Collapse file
+6-2Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
431 | 431 | |
432 | 432 | |
433 | 433 | |
434 | | - |
435 | | - |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
436 | 440 | |
437 | 441 | |
438 | 442 | |
|
0 commit comments