{"thread":{"id":"2590","subject":"[PATCH 3/5] Improve pack list response handling","startedAt":"2005-11-18T19:03:11Z","lastAt":"2005-11-18T19:03:11Z","messageCount":1,"participants":["Nick Hengeveld"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"12235","messageId":"20051118190311.GH3968@reactrix.com","threadId":"2590","inReplyTo":null,"subject":"[PATCH 3/5] Improve pack list response handling","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2005-11-18T19:03:11Z","receivedAt":"2005-11-18T19:03:11Z","isPatch":true,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"Better response handling for pack list requests - a 404 means we do have\nthe list but it happens to be empty.\n\nSigned-off-by: Nick Hengeveld <nickh@reactrix.com>\n\n\n---\n\n http-fetch.c |   12 ++++++++++--\n 1 files changed, 10 insertions(+), 2 deletions(-)\n\napplies-to: 8e27b8361908dda4ea5955f5ffe332b8cf09c0ec\n20223d677b9d7291080acae9f9943aee90ee12ca\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 53a7dbf..4353173 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -637,10 +637,18 @@ static int fetch_indices(struct alt_base\n \tif (start_active_slot(slot)) {\n \t\trun_active_slot(slot);\n \t\tif (slot->curl_result != CURLE_OK) {\n-\t\t\tfree(buffer.buffer);\n-\t\t\treturn error(\"%s\", curl_errorstr);\n+\t\t\tif (slot->http_code == 404) {\n+\t\t\t\trepo->got_indices = 1;\n+\t\t\t\tfree(buffer.buffer);\n+\t\t\t\treturn 0;\n+\t\t\t} else {\n+\t\t\t\trepo->got_indices = 0;\n+\t\t\t\tfree(buffer.buffer);\n+\t\t\t\treturn error(\"%s\", curl_errorstr);\n+\t\t\t}\n \t\t}\n \t} else {\n+\t\trepo->got_indices = 0;\n \t\tfree(buffer.buffer);\n \t\treturn error(\"Unable to start request\");\n \t}\n---\n0.99.9.GIT\n"}]}