]> granicus.if.org Git - php/commitdiff
Fixed WSDL loading using https through proxy
authorDmitry Stogov <dmitry@php.net>
Mon, 8 Nov 2010 11:34:32 +0000 (11:34 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 8 Nov 2010 11:34:32 +0000 (11:34 +0000)
ext/soap/php_sdl.c

index 93ea595195cd582ecb39c541e041ea2239f77dc1..bce3066bf1e2cde689966bde4e46c1856b06a0b4 100644 (file)
@@ -3250,10 +3250,13 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC)
                php_stream_context_set_option(context, "http", "proxy", str_proxy);
                zval_ptr_dtor(&str_proxy);
 
-               MAKE_STD_ZVAL(str_proxy);
-               ZVAL_BOOL(str_proxy, 1);
-               php_stream_context_set_option(context, "http", "request_fulluri", str_proxy);
-               zval_ptr_dtor(&str_proxy);
+               if (uri_len < sizeof("https://")-1 ||
+                   strncasecmp(uri, "https://", sizeof("https://")-1) != 0) {
+                       MAKE_STD_ZVAL(str_proxy);
+                       ZVAL_BOOL(str_proxy, 1);
+                       php_stream_context_set_option(context, "http", "request_fulluri", str_proxy);
+                       zval_ptr_dtor(&str_proxy);
+               }
 
                proxy_authentication(this_ptr, &headers TSRMLS_CC);
        }