Repository navigation
Conversation
Every failure in std.http was status -1 and nothing else: a host that did not
answer, a TLS write that failed, a connection closed before the headers or
before the declared body, too many redirects, a redirect without a Location.
A seed fetch that "failed after 5 attempts" could not say which, and the
next intermittent failure would have been as mute.
`HttpResponse` carries `reason` ("" when the server answered); each failure
site writes its own; `https_download_reason` returns it, or `HTTP <status>`
for a non-200 answer, or the write failure. The source-fetch twin in
lib/std/build.w prints the reason per attempt. build/https_fetch.w is
compiled by the pinned seed, whose std has no `reason` yet, so it prints
what the seed's API can tell apart (no response / HTTP status / write) and
is marked seed-bound for the switch.
ehartford
marked this pull request as ready for review
November 8, 2026 18:00
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.
Fixes #3083.
Every failure in
std.httpwas status -1 and nothing else: a host that did not answer, a TLS write that failed, a connection closed before the headers or before the declared body, too many redirects, a redirect without a Location. A seed fetch that "failed after 5 attempts" could not say which, and the next intermittent failure would have been as mute.HttpResponsecarriesreason("" when the server answered); each failure site writes its own;https_download_reasonreturns it, orHTTP <status>for a non-200 answer, or the write failure. The source-fetch twin inlib/std/build.wprints the reason per attempt.build/https_fetch.wis compiled by the pinned seed, whose std has noreasonyet, so it prints what the seed's API tells apart (no response / HTTP status / write) and is marked seed-bound for the switch.Fixture:
test/behavior/behav_3083_https_failure_reasons.w. Battery on the stack top (#3091).