Improve pack list response handling
PATCH 3/5 Improve pack list response handling
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 <[email protected]>
---
http-fetch.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
applies-to: 8e27b8361908dda4ea5955f5ffe332b8cf09c0ec 20223d677b9d7291080acae9f9943aee90ee12ca
http-fetch.c +10 -2
@@ -637,10 +637,18 @@ static int fetch_indices(struct alt_baseif (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