Skip to content

v0.3.7 — CA-path body cap no longer hangs

Choose a tag to compare

@chimneyQ chimneyQ released this 18 Oct 14:33
· 7 commits to main since this release

0.3.7

Fixed: a page larger than fetchMaxBytes hung ctk_fetch_and_index forever.

The CA path reads the body by hand, and on hitting the cap it called response.destroy() without settling the promise — no resolve, no reject. The tool then sat there until its own 180 s timeout. Only the CA branch could hit this: the no-CA branch still uses the built-in fetch, which caps nothing.

Every exit now settles through one finish(): cap reached, body ended, or read error. Reaching the cap stops the stream and hands back the bytes that fit.

httpsGetWithCa is exported and covered by two assertions against a real local HTTPS server — a 3 MB body through a 64 KB cap settles promptly, and a small body still comes back untouched. The bug survived because the four existing caPemPath assertions all covered resolveCaBundle, which never reads a body.

Gates: offline 94, client 27, packaging 20, release 34 — all pass.

Full Changelog: v0.3.6...v0.3.7