{{ message }}
Commit a027a4a
Backport WebSocket maxPayloadSize fixes to v7.x (#5423)
* feat: add configurable maxPayloadSize for WebSocket (#4955)
(cherry picked from commit bd91f86)
Signed-off-by: Matteo Collina <hello@matteocollina.com>
* test: fix flaky permessage-deflate limit timeout (#5229)
(cherry picked from commit 9d82667)
Signed-off-by: Matteo Collina <hello@matteocollina.com>
* fix(websocket): enforce max payload size across fragments
Account for previously received fragment bytes when checking WebSocket payload size limits, so fragmented messages cannot exceed maxPayloadSize by splitting the payload across frames.
Add coverage for cumulative fragmented payload size enforcement.
Co-authored-by: Matthew Aitken <maitken033380023@gmail.com>
(cherry picked from commit b4c287b)
Signed-off-by: Matteo Collina <hello@matteocollina.com>
* websocket: handle empty fragments and stream limits
Treat zero-byte frames as real fragments so fragmented messages can start
with an empty frame and empty continuations still count toward
maxFragments.
Pass dispatcher WebSocket limits through to WebSocketStream's parser, add
regression coverage for WebSocket and WebSocketStream fragment limits, make
the fragment close tests wait for both endpoints, and fix the Client docs
typo for maxFragments.
Co-authored-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
(cherry picked from commit c5ed787)
Signed-off-by: Matteo Collina <hello@matteocollina.com>
---------
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Matthew Aitken <maitken033380023@gmail.com>
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
Co-authored-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>1 parent 8cb10f9 commit a027a4a
11 files changed
Lines changed: 828 additions & 69 deletions
File tree
- docs/docs/api
- lib
- dispatcher
- web/websocket
- stream
- test/websocket
- stream
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 17 | + | |
25 | 18 | | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
29 | | - | |
| 22 | + | |
30 | 23 | | |
31 | 24 | | |
| 25 | + | |
| 26 | + | |
32 | 27 | | |
33 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 40 | | |
46 | 41 | | |
47 | 42 | | |
| |||
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 62 | | |
72 | 63 | | |
73 | | - | |
74 | | - | |
| 64 | + | |
| 65 | + | |
75 | 66 | | |
76 | | - | |
77 | 67 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 68 | | |
85 | 69 | | |
86 | 70 | | |
| |||
93 | 77 | | |
94 | 78 | | |
95 | 79 | | |
96 | | - | |
97 | 80 | | |
98 | 81 | | |
99 | 82 | | |
100 | 83 | | |
101 | 84 | | |
102 | 85 | | |
103 | | - | |
| 86 | + | |
104 | 87 | | |
105 | 88 | | |
106 | 89 | | |
107 | 90 | | |
108 | 91 | | |
109 | 92 | | |
110 | 93 | | |
111 | | - | |
112 | 94 | | |
113 | 95 | | |
114 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | | - | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| |||
159 | 176 | | |
160 | 177 | | |
161 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
162 | 183 | | |
163 | 184 | | |
164 | 185 | | |
| |||
183 | 204 | | |
184 | 205 | | |
185 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
186 | 211 | | |
187 | 212 | | |
188 | 213 | | |
| |||
205 | 230 | | |
206 | 231 | | |
207 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
208 | 237 | | |
209 | 238 | | |
210 | 239 | | |
| |||
217 | 246 | | |
218 | 247 | | |
219 | 248 | | |
220 | | - | |
| 249 | + | |
221 | 250 | | |
222 | 251 | | |
223 | 252 | | |
| |||
231 | 260 | | |
232 | 261 | | |
233 | 262 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
248 | 292 | | |
| 293 | + | |
249 | 294 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
259 | 298 | | |
260 | 299 | | |
261 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| |||

0 commit comments