+ if (CURLE_OK == curl_easy_setopt(request->ch, CURLOPT_COOKIELIST, "ALL")) {
+ return SUCCESS;
+ }
+#else
+ http_error(HE_WARNING, HTTP_E_REQUEST, "Could not reset cookies (need libcurl >= v7.14.1)");
+#endif
+ }
+ }
+ return FAILURE;
+}
+/* }}} */
+
+PHP_HTTP_API STATUS _http_request_flush_cookies(http_request *request)
+{
+ int initialized = 1;
+ TSRMLS_FETCH_FROM_CTX(request->tsrm_ls);
+
+ HTTP_CHECK_CURL_INIT(request->ch, http_curl_init_ex(request->ch, request), initialized = 0);
+ if (initialized) {
+ if (!http_request_cookies_enabled(request)) {
+ return FAILURE;
+ }
+#if HTTP_CURL_VERSION(7,17,1)
+ if (CURLE_OK == curl_easy_setopt(request->ch, CURLOPT_COOKIELIST, "FLUSH")) {