You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.3.2 --- download_to_file reports the writes the disk refused (#19)
* fix(http): download_to_file reports the writes the disk refused
download_to_file called ofs.write for each body chunk without looking at the
stream, added each chunk's size to bytesWritten from what the network delivered,
and set bytesWritten after ofs.close() without looking at that either. On a full
disk (ENOSPC) the transfer therefore succeeded: a 420,831,054 byte download left
220,979,200 bytes on disk while bytesWritten said 420,831,054 and ok() was true,
and the caller blamed the source (a checksum mismatch) for what was the local
disk.
Each chunk is now flushed and the stream checked. On the first failure the
transfer stops reading, error becomes "write <path>: <reason>" with the reason
taken from errno, and the connection is dropped instead of returned to the pool
with the rest of the body still on it. Closing the file is checked the same way.
Additive: DownloadToFileResult::writeFailed says the fault is the destination
and not the source (a failed write, a failed close, or a file that could not be
opened), and bytesReceived carries the network count. bytesWritten now counts
bytes the file accepted; the two are equal for every transfer that did not fail
to write.
Tests: a download into /dev/full (Linux) against the in-process TLS server
asserts not ok, writeFailed, bytesWritten == 0, the ENOSPC text, that reading
stopped after the first refused chunk, and that the next request opens a new
connection. Verified by mutation: with the stream checks removed it reports
ok() and bytesWritten == 65536.
* 0.3.2 --- download_to_file reports the writes the disk refused
Version, CHANGELOG entry, and the README install lines name this release.
* ci: bump mcpp to 2026.9.28.3 to satisfy the index floor
The index now requires mcpp >= 2026.9.18.3, and MCPP_VERSION pinned 2026.8.29.1,
so every `mcpp` invocation that needed the index ended at
error: index requires mcpp >= 2026.9.18.3 but this is mcpp 2026.8.29.1 [E0006]
That is the failure the "Smoke-test the project templates" step has reported on
master since the scheduled run of 2026-09-21. MCPP_VERSION is the only place the
version is named; both jobs' install steps and both cache keys read it.
---------
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
0 commit comments