AstrBot-Desktop/src-tauri
YokiiroBW 1e9d1c1e77
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
fix(net): bound an attachment download while it runs
F-70. The body was read to completion with `bytes()` and only then
measured against a 16 MiB ceiling, so a server answering an image request
with gigabytes — by fault or by design — was held in memory in full
before anything rejected it. Now read in chunks and abandoned the moment
the ceiling would be crossed, with a declared Content-Length over the
ceiling refused before the body is touched at all.

Promoted from a theoretical bound to a real one by the voice work ahead:
audio replies are far larger than the stickers this path was built for,
so the ceiling becomes reachable in ordinary use rather than only under
attack.

The fake server for this serves its body with `Connection: close` and no
length rather than chunked framing, so the test cannot pass or fail on
the fixture's own framing. It counts the blocks it managed to write, which
is what distinguishes a download that stopped early from one that was read
in full and measured afterwards — confirmed by reverting to `bytes()`,
which fails the test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:55:40 +08:00
..
capabilities fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
icons feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
src fix(net): bound an attachment download while it runs 2026-07-27 05:55:40 +08:00
tests fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
build.rs feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
Cargo.toml feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
tauri.conf.json fix(pet): read stored preferences and stop the pet from stealing focus 2026-07-27 05:25:27 +08:00