Commit b732c92
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
Backport-PR-URL: #34845
PR-URL: #33875
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent bfce0eb commit b732c92Copy full SHA for b732c92
File tree
Expand file treeCollapse file tree
6 files changed
+193
-47
lines changedOpen diff view settings
Filter options
- lib/internal/http2
- src
- test/parallel
Expand file treeCollapse file tree
6 files changed
+193
-47
lines changedOpen diff view settings
Collapse file
+84-22Lines changed: 84 additions & 22 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1158 | 1158 | |
1159 | 1159 | |
1160 | 1160 | |
| 1161 | + |
1161 | 1162 | |
1162 | 1163 | |
1163 | 1164 | |
| ||
1724 | 1725 | |
1725 | 1726 | |
1726 | 1727 | |
| 1728 | + |
| 1729 | + |
| 1730 | + |
| 1731 | + |
| 1732 | + |
| 1733 | + |
| 1734 | + |
| 1735 | + |
| 1736 | + |
| 1737 | + |
| 1738 | + |
| 1739 | + |
| 1740 | + |
| 1741 | + |
| 1742 | + |
| 1743 | + |
| 1744 | + |
| 1745 | + |
| 1746 | + |
| 1747 | + |
1727 | 1748 | |
1728 | 1749 | |
1729 | 1750 | |
| ||
1983 | 2004 | |
1984 | 2005 | |
1985 | 2006 | |
| 2007 | + |
| 2008 | + |
| 2009 | + |
| 2010 | + |
| 2011 | + |
| 2012 | + |
| 2013 | + |
| 2014 | + |
| 2015 | + |
| 2016 | + |
| 2017 | + |
| 2018 | + |
| 2019 | + |
| 2020 | + |
| 2021 | + |
| 2022 | + |
| 2023 | + |
| 2024 | + |
| 2025 | + |
| 2026 | + |
| 2027 | + |
| 2028 | + |
| 2029 | + |
| 2030 | + |
| 2031 | + |
| 2032 | + |
| 2033 | + |
| 2034 | + |
| 2035 | + |
| 2036 | + |
| 2037 | + |
| 2038 | + |
| 2039 | + |
| 2040 | + |
| 2041 | + |
| 2042 | + |
| 2043 | + |
| 2044 | + |
| 2045 | + |
| 2046 | + |
1986 | 2047 | |
1987 | | - |
| 2048 | + |
1988 | 2049 | |
1989 | | - |
| 2050 | + |
1990 | 2051 | |
1991 | 2052 | |
1992 | 2053 | |
| ||
2000 | 2061 | |
2001 | 2062 | |
2002 | 2063 | |
2003 | | - |
2004 | 2064 | |
2005 | 2065 | |
2006 | | - |
2007 | | - |
2008 | | - |
2009 | | - |
2010 | | - |
2011 | | - |
2012 | | - |
2013 | | - |
2014 | | - |
2015 | | - |
2016 | | - |
| 2066 | + |
2017 | 2067 | |
| 2068 | + |
| 2069 | + |
| 2070 | + |
2018 | 2071 | |
2019 | 2072 | |
2020 | 2073 | |
| ||
2119 | 2172 | |
2120 | 2173 | |
2121 | 2174 | |
2122 | | - |
2123 | | - |
2124 | | - |
2125 | | - |
2126 | | - |
| 2175 | + |
| 2176 | + |
| 2177 | + |
| 2178 | + |
| 2179 | + |
| 2180 | + |
| 2181 | + |
| 2182 | + |
| 2183 | + |
| 2184 | + |
| 2185 | + |
| 2186 | + |
| 2187 | + |
| 2188 | + |
2127 | 2189 | |
2128 | 2190 | |
2129 | 2191 | |
| ||
2132 | 2194 | |
2133 | 2195 | |
2134 | 2196 | |
2135 | | - |
| 2197 | + |
2136 | 2198 | |
2137 | | - |
| 2199 | + |
2138 | 2200 | |
2139 | 2201 | |
2140 | 2202 | |
2141 | | - |
| 2203 | + |
2142 | 2204 | |
2143 | 2205 | |
2144 | 2206 | |
|
Collapse file
+7-6Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
811 | 811 | |
812 | 812 | |
813 | 813 | |
814 | | - |
| 814 | + |
815 | 815 | |
816 | 816 | |
817 | 817 | |
| ||
832 | 832 | |
833 | 833 | |
834 | 834 | |
835 | | - |
836 | | - |
837 | | - |
838 | | - |
839 | | - |
| 835 | + |
| 836 | + |
| 837 | + |
| 838 | + |
| 839 | + |
840 | 840 | |
841 | 841 | |
842 | 842 | |
| ||
1174 | 1174 | |
1175 | 1175 | |
1176 | 1176 | |
| 1177 | + |
1177 | 1178 | |
1178 | 1179 | |
1179 | 1180 | |
|
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