Commit 9e0d18f
http2: use and support non-empty DATA frame with END_STREAM flag
Adds support for reading from a stream where the final frame is a
non-empty DATA frame with the END_STREAM flag set, instead of hanging
waiting for another frame. When writing to a stream, uses a
END_STREAM flag on final DATA frame instead of adding an empty
DATA frame.
BREAKING: http2 client now expects servers to properly support
END_STREAM flag
Fixes: #31309
Fixes: #33891
Refs: https://nghttp2.org/documentation/types.html#c.nghttp2_on_data_chunk_recv_callback
PR-URL: #33875
Backport-PR-URL: #34838
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent a16f0f4 commit 9e0d18fCopy full SHA for 9e0d18f
File tree
Expand file treeCollapse file tree
6 files changed
+191
-47
lines changedOpen diff view settings
Filter options
- lib/internal/http2
- src
- test/parallel
Expand file treeCollapse file tree
6 files changed
+191
-47
lines changedOpen diff view settings
Collapse file
+82-22Lines changed: 82 additions & 22 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1136 | 1136 | |
1137 | 1137 | |
1138 | 1138 | |
| 1139 | + |
1139 | 1140 | |
1140 | 1141 | |
1141 | 1142 | |
| ||
1702 | 1703 | |
1703 | 1704 | |
1704 | 1705 | |
| 1706 | + |
| 1707 | + |
| 1708 | + |
| 1709 | + |
| 1710 | + |
| 1711 | + |
| 1712 | + |
| 1713 | + |
| 1714 | + |
| 1715 | + |
| 1716 | + |
| 1717 | + |
| 1718 | + |
| 1719 | + |
| 1720 | + |
| 1721 | + |
| 1722 | + |
| 1723 | + |
| 1724 | + |
| 1725 | + |
1705 | 1726 | |
1706 | 1727 | |
1707 | 1728 | |
| ||
1962 | 1983 | |
1963 | 1984 | |
1964 | 1985 | |
| 1986 | + |
| 1987 | + |
| 1988 | + |
| 1989 | + |
| 1990 | + |
| 1991 | + |
| 1992 | + |
| 1993 | + |
| 1994 | + |
| 1995 | + |
| 1996 | + |
| 1997 | + |
| 1998 | + |
| 1999 | + |
| 2000 | + |
| 2001 | + |
| 2002 | + |
| 2003 | + |
| 2004 | + |
| 2005 | + |
| 2006 | + |
| 2007 | + |
| 2008 | + |
| 2009 | + |
| 2010 | + |
| 2011 | + |
| 2012 | + |
| 2013 | + |
| 2014 | + |
| 2015 | + |
| 2016 | + |
| 2017 | + |
| 2018 | + |
| 2019 | + |
| 2020 | + |
| 2021 | + |
| 2022 | + |
| 2023 | + |
1965 | 2024 | |
1966 | | - |
| 2025 | + |
1967 | 2026 | |
1968 | | - |
| 2027 | + |
1969 | 2028 | |
1970 | 2029 | |
1971 | 2030 | |
| ||
1979 | 2038 | |
1980 | 2039 | |
1981 | 2040 | |
1982 | | - |
1983 | 2041 | |
1984 | 2042 | |
1985 | | - |
1986 | | - |
1987 | | - |
1988 | | - |
1989 | | - |
1990 | | - |
1991 | | - |
1992 | | - |
1993 | | - |
1994 | | - |
1995 | | - |
| 2043 | + |
1996 | 2044 | |
| 2045 | + |
| 2046 | + |
| 2047 | + |
1997 | 2048 | |
1998 | 2049 | |
1999 | 2050 | |
| ||
2098 | 2149 | |
2099 | 2150 | |
2100 | 2151 | |
2101 | | - |
2102 | | - |
2103 | | - |
2104 | | - |
2105 | | - |
| 2152 | + |
| 2153 | + |
| 2154 | + |
| 2155 | + |
| 2156 | + |
| 2157 | + |
| 2158 | + |
| 2159 | + |
| 2160 | + |
| 2161 | + |
| 2162 | + |
| 2163 | + |
| 2164 | + |
| 2165 | + |
2106 | 2166 | |
2107 | 2167 | |
2108 | 2168 | |
| ||
2111 | 2171 | |
2112 | 2172 | |
2113 | 2173 | |
2114 | | - |
| 2174 | + |
2115 | 2175 | |
2116 | | - |
| 2176 | + |
2117 | 2177 | |
2118 | 2178 | |
2119 | 2179 | |
2120 | | - |
| 2180 | + |
2121 | 2181 | |
2122 | 2182 | |
2123 | 2183 | |
|
Collapse file
+7-6Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
732 | 732 | |
733 | 733 | |
734 | 734 | |
735 | | - |
| 735 | + |
736 | 736 | |
737 | 737 | |
738 | 738 | |
| ||
753 | 753 | |
754 | 754 | |
755 | 755 | |
756 | | - |
757 | | - |
758 | | - |
759 | | - |
760 | | - |
| 756 | + |
| 757 | + |
| 758 | + |
| 759 | + |
| 760 | + |
761 | 761 | |
762 | 762 | |
763 | 763 | |
| ||
1093 | 1093 | |
1094 | 1094 | |
1095 | 1095 | |
| 1096 | + |
1096 | 1097 | |
1097 | 1098 | |
1098 | 1099 | |
|
Collapse file
test/parallel/test-http2-misbehaving-multiplex.js
Copy file name to clipboardExpand all lines: test/parallel/test-http2-misbehaving-multiplex.js+39-17Lines changed: 39 additions & 17 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
5 | 6 | |
6 | 7 | |
7 | 8 | |
| ||
13 | 14 | |
14 | 15 | |
15 | 16 | |
| 17 | + |
16 | 18 | |
17 | 19 | |
18 | 20 | |
19 | 21 | |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
| 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 | + |
26 | 47 | |
27 | 48 | |
28 | 49 | |
| ||
35 | 56 | |
36 | 57 | |
37 | 58 | |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
42 | 63 | |
43 | 64 | |
44 | 65 | |
45 | 66 | |
46 | 67 | |
47 | 68 | |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
52 | 74 | |
53 | 75 | |
54 | 76 | |
55 | | - |
56 | | - |
57 | | - |
| 77 | + |
| 78 | + |
| 79 | + |
58 | 80 | |
59 | 81 | |
60 | 82 | |
|
Collapse file
test/parallel/test-http2-pack-end-stream-flag.js
Copy file name to clipboard+61Lines changed: 61 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 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
Collapse file
test/parallel/test-http2-padding-aligned.js
Copy file name to clipboardExpand all lines: test/parallel/test-http2-padding-aligned.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | | - |
| 29 | + |
30 | 30 | |
31 | 31 | |
32 | 32 | |
|
Collapse file
test/parallel/test-http2-perf_hooks.js
Copy file name to clipboardExpand all lines: test/parallel/test-http2-perf_hooks.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | | - |
| 33 | + |
34 | 34 | |
35 | 35 | |
36 | 36 | |
|
0 commit comments