mirror of
https://github.com/fangfufu/httpdirfs.git
synced 2024-09-27 20:51:55 +02:00
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
443f4607f1
commit
fc6ae24d2c
@ -1043,9 +1043,9 @@ range requests\n");
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
lprintf(error, "%s", curl_easy_strerror(ret));
|
lprintf(error, "%s", curl_easy_strerror(ret));
|
||||||
}
|
}
|
||||||
if (!((http_resp != HTTP_OK) ||
|
if ((http_resp != HTTP_OK) &&
|
||||||
(http_resp != HTTP_PARTIAL_CONTENT) ||
|
(http_resp != HTTP_PARTIAL_CONTENT) &&
|
||||||
(http_resp != HTTP_RANGE_NOT_SATISFIABLE))) {
|
(http_resp != HTTP_RANGE_NOT_SATISFIABLE)) {
|
||||||
char *url;
|
char *url;
|
||||||
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
|
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
|
||||||
lprintf(warning, "Could not download %s, HTTP %ld\n", url, http_resp);
|
lprintf(warning, "Could not download %s, HTTP %ld\n", url, http_resp);
|
||||||
|
Loading…
Reference in New Issue
Block a user