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:
Jonathan Kamens 2023-09-29 14:27:36 -04:00 committed by Fufu Fang
parent ab49ca76b6
commit 7bcd43068d
1 changed files with 3 additions and 3 deletions

View File

@ -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);