fix(media): cancel oversized fetch responses · openclaw/openclaw@5e68d2f
openclaw
·
2026-05-29
·
via Recent Commits to openclaw:main
Skip to content
Navigation Menu
Saved searches
Use saved searches to filter your results more quickly
Sign up
Commit 5e68d2f


authored and
committed
fix(media): cancel oversized fetch responses
1 file changed
Lines changed: 5 additions & 1 deletion
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -311,7 +311,11 @@ async function assertMediaContentLength(params: {
|
311 | 311 | } |
312 | 312 | |
313 | 313 | async function discardIgnoredResponseBody(res: Response): Promise<void> { |
314 | | -await res.body?.cancel().catch(() => undefined); |
| 314 | +const cancelBody = res.body?.cancel; |
| 315 | +if (typeof cancelBody !== "function") { |
| 316 | +return; |
| 317 | +} |
| 318 | +await cancelBody.call(res.body).catch(() => undefined); |
315 | 319 | } |
316 | 320 | |
317 | 321 | function resolveRemoteFileName(params: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
0 commit comments