Skip to content

tinyhttps 0.2.10 - #287

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/tinyhttps-0.2.10
Aug 29, 2026
Merged

tinyhttps 0.2.10#287
Sunrisepeak merged 1 commit into
mainfrom
feat/tinyhttps-0.2.10

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

send_stream kept the status line of a failed streaming request and dropped the reason — so a caller could report 400 Bad Request and never model_not_found. Reported and first fixed by @Cloud_Yun in mcpplibs/tinyhttps#11 and #12; landed with the review in mcpplibs/tinyhttps#14.

Three framing defects found while reviewing that change are fixed with it:

  • A declared Content-Length is honoured by send_stream. It had no branch for one, so a non-chunked response was read until the connection closed — and on the library's defaults (keepAlive = true) the server does not close. Measured against a 135-byte error document: 9379 ms at an 8-second read timeout, against 1192 ms now. At the shipped default of 60000 that was a minute.
  • A chunk size that does not parse is no longer a terminal chunk. parse_hex returned what it had accumulated on an unrecognised character and 0 for an empty line — which is what read_line returns on a timeout or a closed connection — so a truncated stream read as one that ended cleanly.
  • Content-Length is rejected rather than salvaged. "abc" was 0 and indistinguishable from a real zero; "-1" was 1; "99999999999999999999" wrapped to 7766279631452241919.

Measured

http=200 bytes=29469
got  7ab1555ff465ae179579cc2d9328db11c847770f9a22148d563cd041dd8e4481   IDENTICAL
合法归档 ✓

Fetched back from the published CN URL, hashed against the GitHub tag tarball, and opened as an archive.

Locally: check_mirror_urls, check_package_name, check_cross_package_refs, check_platform_version_parity, check_duplicate_versions all pass. Appended after 0.2.9 in all three platform tables, matching this descriptor's ascending order.

⚠️ No CI run has gone green on tinyhttps#14. Its pull-request run was cancelled without ever being allocated a runner, and master's run is queued behind the same shortage. The evidence for the change is local: 17 tests from 6 test suites plus 3 in test_resolver, on the host and again on x86_64-linux-musl over openkal.

`send_stream` kept the status line of a failed streaming request and dropped
the reason. It now keeps the body, and three framing defects found while
reviewing that change are fixed with it: a declared `Content-Length` is
honoured (the error body used to arrive one full read timeout late on the
library's own defaults), a chunk size that does not parse is no longer read as a
terminal chunk, and `Content-Length` is rejected rather than salvaged.

Reported and first fixed by Cloud_Yun in mcpplibs/tinyhttps#11 and #12; landed
with the review in #14.

Measured before this commit: the CN mirror asset returns 200, opens as an
archive, and its sha256 is identical to the GitHub tag tarball.
@Sunrisepeak

Copy link
Copy Markdown
Member Author

@Sunrisepeak
Sunrisepeak merged commit 8ac08e6 into main Aug 29, 2026
11 checks passed
@Sunrisepeak
Sunrisepeak deleted the feat/tinyhttps-0.2.10 branch August 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant