Merge branch 'jk/http-walker-limit-redirect'

Update the error messages from the dumb-http client when it fails
to obtain loose objects; we used to give sensible error message
only upon 404 but we now forbid unexpected redirects that needs to
be reported with something sensible.

* jk/http-walker-limit-redirect:
  http-walker: complain about non-404 loose object errors
This commit is contained in:
Junio C Hamano
2016-12-19 14:45:32 -08:00
2 changed files with 6 additions and 3 deletions

2
http.c
View File

@ -2058,7 +2058,7 @@ static size_t fwrite_sha1_file(char *ptr, size_t eltsize, size_t nmemb,
if (c != CURLE_OK)
die("BUG: curl_easy_getinfo for HTTP code failed: %s",
curl_easy_strerror(c));
if (slot->http_code >= 400)
if (slot->http_code >= 300)
return size;
}