From 6c4aac679c57cea2e3f7524974509595dc1a31a2 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sun, 21 May 2006 18:45:37 +0000 Subject: [PATCH] - #ifdef CURLOPT_COOKIELIST out for libcurl < v7.14.1 --- http_request_object.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http_request_object.c b/http_request_object.c index b2d45fc..6093542 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -472,12 +472,14 @@ void _http_request_object_free(zend_object *object TSRMLS_DC) efree(o); } +#if HTTP_CURL_VERSION(7,14,1) #define http_request_object_resetcookies(o) _http_request_object_resetcookies((o) TSRMLS_CC) static inline STATUS _http_request_object_resetcookies(zval *this_ptr TSRMLS_DC) { getObject(http_request_object, obj); return curl_easy_setopt(obj->request->ch, CURLOPT_COOKIELIST, "ALL"); } +#endif #define http_request_object_check_request_content_type(t) _http_request_object_check_request_content_type((t) TSRMLS_CC) static inline void _http_request_object_check_request_content_type(zval *this_ptr TSRMLS_DC) @@ -882,8 +884,10 @@ PHP_METHOD(HttpRequest, setOptions) zend_call_method_with_1_params(&getThis(), Z_OBJCE_P(getThis()), NULL, "seturl", NULL, *opt); } else if (!strcmp(key, "method")) { zend_call_method_with_1_params(&getThis(), Z_OBJCE_P(getThis()), NULL, "setmethod", NULL, *opt); +#if HTTP_CURL_VERSION(7,14,1) } else if (!strcmp(key, "resetcookies")) { http_request_object_resetcookies(getThis()); +#endif } else { ZVAL_ADDREF(*opt); add_assoc_zval(add_opts, key, *opt); -- 2.30.2