Commit 2d0ee43
iframe-proxy: settle collectBody on truncation so error page serves
stream.destroy() (no error arg) emits 'close'/'aborted' but neither
'end' nor 'error', so the listeners that call complete() never fired on
the truncation path — the over-limit branch in collectBody's callback was
unreachable and the downstream response hung with nothing served. Call
complete() explicitly after destroy(), guarded by a 'settled' flag so the
normal end/error path can't double-serve.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 72d13a4 commit 2d0ee43
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
242 | 251 | | |
| 252 | + | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
246 | 256 | | |
247 | | - | |
248 | 257 | | |
249 | 258 | | |
250 | 259 | | |
| |||
0 commit comments