php_http_buffer_t ranges;
struct {
- uint count;
+ uint32_t count;
double delay;
} retry;
long l = 0;
double d = 0;
struct curl_slist *s = NULL, *p = NULL;
- zval tmp = {{0}};
+ zval tmp;
+
+ ZVAL_NULL(&tmp);
/* BEGIN::CURLINFO */
if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_EFFECTIVE_URL, &c)) {
zend_hash_str_update(info, "scheme", lenof("scheme"), &tmp);
}
#endif
+#if PHP_HTTP_CURL_VERSION(7,72,0)
+ if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_EFFECTIVE_METHOD, &c)) {
+ ZVAL_STRING(&tmp, STR_PTR(c));
+ zend_hash_str_update(info, "effective_method", lenof("effective_method"), &tmp);
+ }
+#endif
+#if PHP_HTTP_CURL_VERSION(7,73,0)
+ if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_PROXY_ERROR, &l)) {
+ ZVAL_LONG(&tmp, l);
+ zend_hash_str_update(info, "proxy_error", lenof("proxy_error"), &tmp);
+ }
+#endif
/* END::CURLINFO */
#if PHP_HTTP_CURL_VERSION(7,19,4)
php_http_option_register(registry, ZEND_STRL("noproxy"), CURLOPT_NOPROXY, IS_STRING);
#endif
+#if PHP_HTTP_CURL_VERSION(7,55,0)
+ php_http_option_register(registry, ZEND_STRL("socks5_auth"), CURLOPT_SOCKS5_AUTH, IS_LONG);
+#endif
#if PHP_HTTP_CURL_VERSION(7,37,0)
if ((opt = php_http_option_register(registry, ZEND_STRL("proxyheader"), CURLOPT_PROXYHEADER, IS_ARRAY))) {
curl_easy_setopt(handler->handle, CURLOPT_COOKIELIST, "FLUSH");
curl_easy_setopt(handler->handle, CURLOPT_SHARE, NULL);
/* see gh issue #84 */
- //if (php_http_curle_get_storage(handler->handle)->cookiestore) {
- //curl_easy_setopt(handler->handle, CURLOPT_COOKIEJAR, NULL);
- //}
+#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)
/*
* Auth Constants
*/
+ REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_NONE", CURLAUTH_NONE, CONST_CS|CONST_PERSISTENT);
REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_BASIC", CURLAUTH_BASIC, CONST_CS|CONST_PERSISTENT);
REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_DIGEST", CURLAUTH_DIGEST, CONST_CS|CONST_PERSISTENT);
#if PHP_HTTP_CURL_VERSION(7,19,3)