Skip to content

Commit

Permalink
Fallback to non-range requests when HEAD returns 404
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Mar 4, 2024
1 parent e66afa8 commit f685702
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/uv-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ impl ErrorKind {
// HEAD requests, so we can't check for range requests.
Self::ReqwestError(err) => {
if let Some(status) = err.status() {
if status == reqwest::StatusCode::METHOD_NOT_ALLOWED {
if status == reqwest::StatusCode::METHOD_NOT_ALLOWED
|| status == reqwest::StatusCode::NOT_FOUND
{
return true;
}
}
Expand Down

0 comments on commit f685702

Please sign in to comment.