summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2010-11-08 11:34:32 +0000
committerDmitry Stogov <dmitry@php.net>2010-11-08 11:34:32 +0000
commit37f3ce6232ab8c82d3eecbdc69fc04e5ebeaf6c3 (patch)
treeba1d5e10700da1df31d5c12c18086788c9ee5bda
parent2dd4a2915c293cf19cbe4f43e4971b799d5ff122 (diff)
downloadphp-git-37f3ce6232ab8c82d3eecbdc69fc04e5ebeaf6c3.tar.gz
Fixed WSDL loading using https through proxy
-rw-r--r--ext/soap/php_sdl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 081187f6e8..b4aad55463 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -3239,10 +3239,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);
}