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
{{ message }}
Repository navigation
Commit a9ab399
Browse filesBrowse the repository at this point in the historyBrowse files
nvx: name the HTTP statuses of the GitHub release client
The GitHub release client of nvx download spelled the HTTP statuses
that it acts on as bare literals, and the same class in different
forms: the success check was !(200..300).contains(..) in download but
the range pattern 200..=299 in json, the redirect check (300..400)
appeared twice, the least valid status was a bare 100, and 404 was
repeated in json and hint next to 401 and 403.
Name them once, in module-private constants whose doc comments cite
RFC 9110 section 15: MIN_STATUS, SUCCESSFUL, REDIRECTION,
UNAUTHORIZED, FORBIDDEN, and NOT_FOUND. json matches a successful
status with a guard first, as 200..=299 did, so the arms keep their
order. The values, requests, redirects, errors, and hints are
unchanged.
Tests: the 13 host::cli::download::github unit tests, which cover
redirects, response parsing, error responses, and hints, pass
unchanged at the base 2e30219 and with this change on Windows.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments