dmitry Mon, 08 Nov 2010 11:34:32 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305198
Log:
Fixed WSDL loading using https through proxy
Changed paths:
U php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c
U php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c
U php/php-src/trunk/ext/soap/php_sdl.c
Modified: php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c 2010-11-08 10:38:19 UTC
(rev 305197)
+++ php/php-src/branches/PHP_5_2/ext/soap/php_sdl.c 2010-11-08 11:34:32 UTC
(rev 305198)
@@ -3239,10 +3239,13 @@
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);
}
Modified: php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2010-11-08 10:38:19 UTC
(rev 305197)
+++ php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2010-11-08 11:34:32 UTC
(rev 305198)
@@ -3250,10 +3250,13 @@
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);
}
Modified: php/php-src/trunk/ext/soap/php_sdl.c
===================================================================
--- php/php-src/trunk/ext/soap/php_sdl.c 2010-11-08 10:38:19 UTC (rev
305197)
+++ php/php-src/trunk/ext/soap/php_sdl.c 2010-11-08 11:34:32 UTC (rev
305198)
@@ -3250,10 +3250,13 @@
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);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php