Fix broken curl HTTP response code check
The check for the HTTP response code from the curl library was written incorrectly and guaranteed to always fail. I've fixed the logic to reflect what I believe was intended.
This commit is contained in:
parent
ab49ca76b6
commit
7bcd43068d
|
@ -1043,9 +1043,9 @@ range requests\n");
|
|||
if (ret) {
|
||||
lprintf(error, "%s", curl_easy_strerror(ret));
|
||||
}
|
||||
if (!((http_resp != HTTP_OK) ||
|
||||
(http_resp != HTTP_PARTIAL_CONTENT) ||
|
||||
(http_resp != HTTP_RANGE_NOT_SATISFIABLE))) {
|
||||
if ((http_resp != HTTP_OK) &&
|
||||
(http_resp != HTTP_PARTIAL_CONTENT) &&
|
||||
(http_resp != HTTP_RANGE_NOT_SATISFIABLE)) {
|
||||
char *url;
|
||||
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
|
||||
lprintf(warning, "Could not download %s, HTTP %ld\n", url, http_resp);
|
||||
|
|
Loading…
Reference in New Issue