Now retry on HTTP 520 (Unknown error)
This commit is contained in:
parent
56e1095287
commit
ff67794b02
|
@ -200,9 +200,11 @@ void Link_set_file_stat(Link* this_link, CURL *curl)
|
|||
}
|
||||
} else {
|
||||
fprintf(stderr, "Link_set_file_stat(): HTTP %ld", http_resp);
|
||||
if (http_resp == HTTP_TOO_MANY_REQUESTS) {
|
||||
if ((http_resp == HTTP_TOO_MANY_REQUESTS) ||
|
||||
(http_resp == HTTP_UNKNOWN_ERROR)) {
|
||||
fprintf(stderr, ", retrying later.\n");
|
||||
} else {
|
||||
fprintf(stderr, "\n");
|
||||
this_link->type = LINK_INVALID;
|
||||
}
|
||||
fprintf(stderr, ".\n");
|
||||
|
|
|
@ -12,7 +12,8 @@ typedef enum {
|
|||
HTTP_OK = 200,
|
||||
HTTP_PARTIAL_CONTENT = 206,
|
||||
HTTP_RANGE_NOT_SATISFIABLE = 416,
|
||||
HTTP_TOO_MANY_REQUESTS = 429
|
||||
HTTP_TOO_MANY_REQUESTS = 429,
|
||||
HTTP_UNKNOWN_ERROR = 520
|
||||
} HTTPResponseCode;
|
||||
|
||||
typedef enum {
|
||||
|
|
Loading…
Reference in New Issue