tinyhttps 0.2.10 - #287
Merged
Merged
Conversation
`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.
Member
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
send_streamkept the status line of a failed streaming request and dropped the reason — so a caller could report400 Bad Requestand nevermodel_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:
Content-Lengthis honoured bysend_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.parse_hexreturned what it had accumulated on an unrecognised character and0for an empty line — which is whatread_linereturns on a timeout or a closed connection — so a truncated stream read as one that ended cleanly.Content-Lengthis rejected rather than salvaged."abc"was0and indistinguishable from a real zero;"-1"was1;"99999999999999999999"wrapped to7766279631452241919.Measured
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_versionsall pass. Appended after0.2.9in all three platform tables, matching this descriptor's ascending order.17 tests from 6 test suitesplus 3 intest_resolver, on the host and again onx86_64-linux-muslover openkal.