[PATCH 4/7] Handle missing HTTP_CONNECTCODE in curl < 7.10.7

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

 



With curl < 7.10.7 we cannot get the proxy CONNECT response code.
As a workaround set it to zero which means no response code available.

Signed-off-by: Tom G. Christensen <tgc@xxxxxxxxxxxxxxx>
---
 http.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/http.c b/http.c
index 96d84bbed..ce618bdca 100644
--- a/http.c
+++ b/http.c
@@ -214,8 +214,12 @@ static void finish_active_slot(struct active_request_slot *slot)
 		slot->results->auth_avail = 0;
 #endif
 
+#if LIBCURL_VERSION_NUM >= 0x070a07
 		curl_easy_getinfo(slot->curl, CURLINFO_HTTP_CONNECTCODE,
 			&slot->results->http_connectcode);
+#else
+		slot->results->http_connectcode = 0;
+#endif
 	}
 
 	/* Run callback if appropriate */
-- 
2.12.2




[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]