diff options
author | Junio C Hamano <junkio@cox.net> | 2005-12-22 18:14:31 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-22 18:14:31 -0800 |
commit | c63da8d8e8c5b5078e59af15c1a41ff98ad61d59 (patch) | |
tree | 26958529f1ffcf1a257fe602c1d49664c46d8b64 /http-fetch.c | |
parent | 8d712aafd2df3c1f5147a28947f98cefe667cf76 (diff) | |
parent | 1e80e0449248edb77b0fb9853f4a3404a599e207 (diff) |
GIT 1.0.3v1.0.3
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-fetch.c')
-rw-r--r-- | http-fetch.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/http-fetch.c b/http-fetch.c index 3cd6ef91af..61b2188adb 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -267,7 +267,8 @@ static void process_object_response(void *callback_data) obj_req->state = COMPLETE; /* Use alternates if necessary */ - if (obj_req->http_code == 404) { + if (obj_req->http_code == 404 || + obj_req->curl_result == CURLE_FILE_COULDNT_READ_FILE) { fetch_alternates(alt->base); if (obj_req->repo->next != NULL) { obj_req->repo = @@ -475,7 +476,8 @@ static void process_alternates_response(void *callback_data) } } } else if (slot->curl_result != CURLE_OK) { - if (slot->http_code != 404) { + if (slot->http_code != 404 && + slot->curl_result != CURLE_FILE_COULDNT_READ_FILE) { got_alternates = -1; return; } @@ -637,7 +639,8 @@ static int fetch_indices(struct alt_base *repo) if (start_active_slot(slot)) { run_active_slot(slot); if (slot->curl_result != CURLE_OK) { - if (slot->http_code == 404) { + if (slot->http_code == 404 || + slot->curl_result == CURLE_FILE_COULDNT_READ_FILE) { repo->got_indices = 1; free(buffer.buffer); return 0; @@ -802,7 +805,8 @@ static int fetch_object(struct alt_base *repo, unsigned char *sha1) ret = error("Request for %s aborted", hex); } else if (obj_req->curl_result != CURLE_OK && obj_req->http_code != 416) { - if (obj_req->http_code == 404) + if (obj_req->http_code == 404 || + obj_req->curl_result == CURLE_FILE_COULDNT_READ_FILE) ret = -1; /* Be silent, it is probably in a pack. */ else ret = error("%s (curl_result = %d, http_code = %ld, sha1 = %s)", |