Repository navigation
Commit 48a0066
committed
Keep the HTTP/2 receive window credit in sync when the window shrinks
Shrinking :initial_window_size adjusted each stream's receive window
size but not its remaining credit. The server applies the difference to
its view of the window as well (RFC 9113 6.9.2), so the next refill
computed an increment of zero or a negative number and sent it in a
WINDOW_UPDATE frame. A negative increment lands in the unsigned 31-bit
field as a value near 2^31, which the server has to answer with a
FLOW_CONTROL_ERROR stream reset (RFC 9113 6.9.1), and a zero increment
is a PROTOCOL_ERROR stream error (RFC 9113 6.9).
The remaining credit now follows the size change, and a refill is only
sent when the increment is positive.1 parent 9e9ae10 commit 48a0066
2 files changed
Lines changed: 46 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | | - | |
1915 | | - | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
1916 | 1917 | | |
1917 | 1918 | | |
1918 | 1919 | | |
| |||
1922 | 1923 | | |
1923 | 1924 | | |
1924 | 1925 | | |
1925 | | - | |
1926 | | - | |
| 1926 | + | |
1927 | 1927 | | |
| 1928 | + | |
| 1929 | + | |
1928 | 1930 | | |
1929 | 1931 | | |
1930 | 1932 | | |
| |||
2255 | 2257 | | |
2256 | 2258 | | |
2257 | 2259 | | |
2258 | | - | |
2259 | | - | |
2260 | | - | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
2261 | 2266 | | |
2262 | 2267 | | |
2263 | 2268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2247 | 2247 | | |
2248 | 2248 | | |
2249 | 2249 | | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
2250 | 2284 | | |
2251 | 2285 | | |
2252 | 2286 | | |
| |||
0 commit comments