From: Nick Hengeveld <nickh@reactrix.com>
To: git@vger.kernel.org
Subject: [PATCH 3/5] Improve pack list response handling
Date: Fri, 18 Nov 2005 11:03:11 -0800 [thread overview]
Message-ID: <20051118190311.GH3968@reactrix.com> (raw)
Better response handling for pack list requests - a 404 means we do have
the list but it happens to be empty.
Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
---
http-fetch.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
applies-to: 8e27b8361908dda4ea5955f5ffe332b8cf09c0ec
20223d677b9d7291080acae9f9943aee90ee12ca
diff --git a/http-fetch.c b/http-fetch.c
index 53a7dbf..4353173 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -637,10 +637,18 @@ static int fetch_indices(struct alt_base
if (start_active_slot(slot)) {
run_active_slot(slot);
if (slot->curl_result != CURLE_OK) {
- free(buffer.buffer);
- return error("%s", curl_errorstr);
+ if (slot->http_code == 404) {
+ repo->got_indices = 1;
+ free(buffer.buffer);
+ return 0;
+ } else {
+ repo->got_indices = 0;
+ free(buffer.buffer);
+ return error("%s", curl_errorstr);
+ }
}
} else {
+ repo->got_indices = 0;
free(buffer.buffer);
return error("Unable to start request");
}
---
0.99.9.GIT
reply other threads:[~2005-11-18 19:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051118190311.GH3968@reactrix.com \
--to=nickh@reactrix.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.