allow setting proxyhost request option to NULL
authorMichael Wallner <mike@php.net>
Wed, 27 Apr 2016 06:33:43 +0000 (08:33 +0200)
committerMichael Wallner <mike@php.net>
Wed, 27 Apr 2016 06:33:43 +0000 (08:33 +0200)
This allows to override any environment setting.
Closes issue #33

src/php_http_client_curl.c

index 3a262a206c67740707dce6038d845eeea251b439..f28f603eda751bc8455cce010237867e90ac5b54 100644 (file)
@@ -1241,9 +1241,7 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC)
 #endif
 
        /* proxy */
-       if ((opt = php_http_option_register(registry, ZEND_STRL("proxyhost"), CURLOPT_PROXY, IS_STRING))) {
-               opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
-       }
+       php_http_option_register(registry, ZEND_STRL("proxyhost"), CURLOPT_PROXY, IS_STRING);
        php_http_option_register(registry, ZEND_STRL("proxytype"), CURLOPT_PROXYTYPE, IS_LONG);
        php_http_option_register(registry, ZEND_STRL("proxyport"), CURLOPT_PROXYPORT, IS_LONG);
        if ((opt = php_http_option_register(registry, ZEND_STRL("proxyauth"), CURLOPT_PROXYUSERPWD, IS_STRING))) {