X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=1b42347ddf1ad9114f02a7e0ef0f0d98e5c9b5b2;hp=22930413027c6a90976fbf9d947a695d764c4c83;hb=09e6d980d8f2a33bbdb21e174557f8a5718a7340;hpb=bd039a8d0770283c0d8c1e382af5462b9da4d03d diff --git a/http_request_object.c b/http_request_object.c index 2293041..1b42347 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -439,6 +439,10 @@ PHP_MINIT_FUNCTION(http_request_object) # if HTTP_CURL_VERSION(7,15,2) zend_declare_class_constant_long(THIS_CE, ZEND_STRS("PROXY_SOCKS4")-1, CURLPROXY_SOCKS4 TSRMLS_CC); # endif +#if HTTP_CURL_VERSION(7,18,0) + zend_declare_class_constant_long(THIS_CE, ZEND_STRS("PROXY_SOCKS4A")-1, CURLPROXY_SOCKS5 TSRMLS_CC); + zend_declare_class_constant_long(THIS_CE, ZEND_STRS("PROXY_SOCKS5_HOSTNAME")-1, CURLPROXY_SOCKS5 TSRMLS_CC); +#endif zend_declare_class_constant_long(THIS_CE, ZEND_STRS("PROXY_SOCKS5")-1, CURLPROXY_SOCKS5 TSRMLS_CC); zend_declare_class_constant_long(THIS_CE, ZEND_STRS("PROXY_HTTP")-1, CURLPROXY_HTTP TSRMLS_CC); #endif /* WONKY */ @@ -637,7 +641,7 @@ STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_ if ( (Z_TYPE_P(options) != IS_ARRAY) || (SUCCESS != zend_hash_find(Z_ARRVAL_P(options), "onprogress", sizeof("onprogress"), (void *) &entry) - || (!zend_is_callable(*entry, 0, NULL)))) { + || (!IS_CALLABLE(*entry, 0, NULL)))) { MAKE_STD_ZVAL(pcb); array_init(pcb); ZVAL_ADDREF(getThis()); @@ -781,7 +785,7 @@ static inline void _http_request_object_set_options_subr(INTERNAL_FUNCTION_PARAM } } else if (opts) { if (prettify_keys) { - zend_hash_apply_with_arguments(Z_ARRVAL_P(opts), apply_pretty_key, 0); + zend_hash_apply_with_arguments(Z_ARRVAL_P(opts) HTTP_ZAPI_HASH_TSRMLS_CC, apply_pretty_key, 0, NULL); } ZVAL_ADDREF(opts); add_assoc_zval_ex(new_opts, key, len, opts);