From: Michael Wallner Date: Mon, 2 Aug 2021 14:58:59 +0000 (+0200) Subject: fix #116: cookies fail with libcurl >= 7.77 X-Git-Tag: v4.2.0~7 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ccd8182038d5a58e6d8f0eb6b3921ebb66baeed0;p=m6w6%2Fext-http fix #116: cookies fail with libcurl >= 7.77 --- diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 89ae5e0..0e79f19 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -856,7 +856,7 @@ static ZEND_RESULT_CODE php_http_curle_option_set_cookiestore(php_http_option_t } else { storage->cookiestore = NULL; } - if ( CURLE_OK != curl_easy_setopt(ch, CURLOPT_COOKIEFILE, storage->cookiestore) + if ( CURLE_OK != curl_easy_setopt(ch, CURLOPT_COOKIEFILE, storage->cookiestore ? storage->cookiestore : "") || CURLE_OK != curl_easy_setopt(ch, CURLOPT_COOKIEJAR, storage->cookiestore) ) { return FAILURE;