Commit 8a6fab0
committed
http: emit 'error' on aborted server request
Server requests aka. IncomingMessage emits 'aborted'
instead of 'error' which causes confusion when
the object is used as a regular stream, i.e. if
functions working on streams are passed a
server request object they might not work properly
unless they take this into account.
Refs: nodejs/web-server-frameworks#41
PR-URL: #33172
Fixes: #28172
Refs: #28677
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent cbf2fa6 commit 8a6fab0Copy full SHA for 8a6fab0
File tree
Expand file treeCollapse file tree
8 files changed
+121
-35
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
8 files changed
+121
-35
lines changedOpen diff view settings
Collapse file
+8-3Lines changed: 8 additions & 3 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
333 | 333 | |
334 | 334 | |
335 | 335 | |
336 | | - |
337 | | - |
338 | | - |
| 336 | + |
| 337 | + |
339 | 338 | |
340 | 339 | |
341 | 340 | |
| ||
2417 | 2416 | |
2418 | 2417 | |
2419 | 2418 | |
| 2419 | + |
| 2420 | + |
2420 | 2421 | |
2421 | 2422 | |
2422 | 2423 | |
| ||
2445 | 2446 | |
2446 | 2447 | |
2447 | 2448 | |
| 2449 | + |
| 2450 | + |
2448 | 2451 | |
2449 | 2452 | |
2450 | 2453 | |
| ||
2474 | 2477 | |
2475 | 2478 | |
2476 | 2479 | |
| 2480 | + |
| 2481 | + |
2477 | 2482 | |
2478 | 2483 | |
2479 | 2484 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
417 | 417 | |
418 | 418 | |
419 | 419 | |
| 420 | + |
420 | 421 | |
421 | 422 | |
422 | 423 | |
| 424 | + |
| 425 | + |
| 426 | + |
423 | 427 | |
424 | 428 | |
425 | 429 | |
|
Collapse file
+9-1Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
56 | 56 | |
57 | 57 | |
58 | 58 | |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
59 | 63 | |
60 | 64 | |
61 | 65 | |
62 | 66 | |
63 | 67 | |
64 | | - |
| 68 | + |
65 | 69 | |
66 | 70 | |
67 | 71 | |
| ||
536 | 540 | |
537 | 541 | |
538 | 542 | |
| 543 | + |
539 | 544 | |
540 | 545 | |
541 | 546 | |
| 547 | + |
| 548 | + |
| 549 | + |
542 | 550 | |
543 | 551 | |
544 | 552 | |
|
Collapse file
test/parallel/test-http-abort-client.js
Copy file name to clipboardExpand all lines: test/parallel/test-http-abort-client.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
| 44 | + |
| 45 | + |
| 46 | + |
44 | 47 | |
45 | 48 | |
46 | 49 | |
|
Collapse file
test/parallel/test-http-aborted.js
Copy file name to clipboardExpand all lines: test/parallel/test-http-aborted.js+51-16Lines changed: 51 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
| 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 | + |
11 | 48 | |
12 | | - |
13 | | - |
14 | | - |
15 | 49 | |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
23 | 59 | |
24 | | - |
25 | 60 | |
26 | | - |
| 61 | + |
Collapse file
test/parallel/test-http-client-aborted-event.js
Copy file name to clipboardExpand all lines: test/parallel/test-http-client-aborted-event.js+39-14Lines changed: 39 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
10 | 11 | |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
19 | 24 | |
20 | | - |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
Collapse file
test/parallel/test-http-client-spurious-aborted.js
Copy file name to clipboardExpand all lines: test/parallel/test-http-client-spurious-aborted.js+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
60 | 60 | |
61 | 61 | |
62 | 62 | |
| 63 | + |
63 | 64 | |
64 | 65 | |
65 | 66 | |
66 | 67 | |
67 | 68 | |
68 | 69 | |
| 70 | + |
| 71 | + |
| 72 | + |
69 | 73 | |
70 | 74 | |
71 | | - |
72 | 75 | |
73 | 76 | |
74 | 77 | |
|
Collapse file
test/parallel/test-http-outgoing-message-capture-rejection.js
Copy file name to clipboardExpand all lines: test/parallel/test-http-outgoing-message-capture-rejection.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
33 | 33 | |
34 | 34 | |
35 | 35 | |
| 36 | + |
| 37 | + |
| 38 | + |
36 | 39 | |
37 | 40 | |
38 | 41 | |
|
0 commit comments