limit the workaround for #84 to libcurl 7.63-7.64
authorMichael Wallner <mike@php.net>
Wed, 13 Jan 2021 08:59:56 +0000 (09:59 +0100)
committerMichael Wallner <mike@php.net>
Wed, 13 Jan 2021 09:43:09 +0000 (10:43 +0100)
fix #89

src/php_http_client_curl.c

index 94cdf474180549023805549a22230d02e20b3b4b..619826a1c43b6c47f7f504b936b4837a9270dea0 100644 (file)
@@ -2075,7 +2075,9 @@ static void php_http_client_curl_handler_clear(php_http_client_curl_handler_t *h
        curl_easy_setopt(handler->handle, CURLOPT_COOKIELIST, "FLUSH");
        curl_easy_setopt(handler->handle, CURLOPT_SHARE, NULL);
        /* see gh issue #84 */
+#if PHP_HTTP_CURL_VERSION(7,63,0) && !PHP_HTTP_CURL_VERSION(7,65,0)
        curl_easy_setopt(handler->handle, CURLOPT_COOKIEJAR, NULL);
+#endif
 }
 
 static void php_http_client_curl_handler_dtor(php_http_client_curl_handler_t *handler)