Patch for http-fetch.c and older curl releases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

Older curl releases do not define CURLE_HTTP_RETURNED_ERROR, they
use CURLE_HTTP_NOT_FOUND instead. The trivial patch below fixes
the build error. Newer curl releases keep the CURLE_HTTP_NOT_FOUND
definition but using a -DCURL_NO_OLDIES preprocessor flag
the old name will not be present in the 'curl.h' header. The
comments in 'curl.h' have more info about the name change.

Signed-off-by:  Art Haas <ahaas@xxxxxxxxxxx>

diff --git a/http-fetch.c b/http-fetch.c
index bc74f30..76fcdc7 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -149,7 +149,7 @@ static int missing__target(int code, int
 	return	/* file:// URL -- do we ever use one??? */
 		(result == CURLE_FILE_COULDNT_READ_FILE) ||
 		/* http:// and https:// URL */
-		(code == 404 && result == CURLE_HTTP_RETURNED_ERROR) ||
+		(code == 404 && result == CURLE_HTTP_NOT_FOUND) ||
 		/* ftp:// URL */
 		(code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
 		;

-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]