Commit ece428e
http: fix no dumping after
When `maybeReadMore` kicks in on a first bytes of incoming data, the
`req.read(0)` will be invoked and the `req._consuming` will be set to
`true`. This seemingly harmless property leads to a dire consequences:
the server won't call `req._dump()` and the whole HTTP/1.1 pipeline will
hang (single connection).
PR-URL: #7211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>maybeReadMore
1 parent 629a76f commit ece428eCopy full SHA for ece428e
File tree
Expand file treeCollapse file tree
2 files changed
+60
-0
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+60
-0
lines changedOpen diff view settings
Collapse file
+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
23 | 30 | |
24 | 31 | |
25 | 32 | |
| ||
67 | 74 | |
68 | 75 | |
69 | 76 | |
| 77 | + |
| 78 | + |
70 | 79 | |
71 | 80 | |
72 | 81 | |
|
Collapse file
test/parallel/test-http-no-read-no-dump.js
Copy file name to clipboard+51Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
0 commit comments