From: Michael Wallner Date: Sun, 21 May 2006 18:45:37 +0000 (+0000) Subject: - #ifdef CURLOPT_COOKIELIST out for libcurl < v7.14.1 X-Git-Tag: RELEASE_1_0_0~20 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6c4aac679c57cea2e3f7524974509595dc1a31a2;p=m6w6%2Fext-http - #ifdef CURLOPT_COOKIELIST out for libcurl < v7.14.1 --- 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);