summaryrefslogtreecommitdiff
path: root/ext/soap/php_sdl.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-07-20 10:21:49 +0000
committerDmitry Stogov <dmitry@php.net>2005-07-20 10:21:49 +0000
commite07d2f4803b0ffe7d6177b339184b8c9c9937bf3 (patch)
tree25143fa006a69a8ff13848ac69efcd9f8b92d228 /ext/soap/php_sdl.c
parent3102638061edb89cd5c5586252a4b69aa5033f44 (diff)
downloadphp-git-e07d2f4803b0ffe7d6177b339184b8c9c9937bf3.tar.gz
"_local_cert" and "_passphrase" properties moved into "_stream_context".
As a result now it is possible to use certificates during access WSDL files.
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r--ext/soap/php_sdl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 229aed785c..4699a585e6 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -2214,9 +2214,14 @@ sdlPtr get_sdl(zval *this_ptr, char *uri TSRMLS_DC)
char* old_error_code = SOAP_GLOBAL(error_code);
int uri_len;
php_stream_context *context=NULL;
- zval **proxy_host, **proxy_port, *orig_context, *new_context;
+ zval **tmp, **proxy_host, **proxy_port, *orig_context, *new_context;
smart_str headers = {0};
+ if (SUCCESS == zend_hash_find(Z_OBJPROP_P(this_ptr),
+ "_stream_context", sizeof("_stream_context"), (void**)&tmp)) {
+ context = php_stream_context_from_zval(*tmp, 0);
+ }
+
if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_host", sizeof("_proxy_host"), (void **) &proxy_host) == SUCCESS &&
Z_TYPE_PP(proxy_host) == IS_STRING &&
zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_port", sizeof("_proxy_port"), (void **) &proxy_port) == SUCCESS &&
@@ -2235,7 +2240,9 @@ sdlPtr get_sdl(zval *this_ptr, char *uri TSRMLS_DC)
ZVAL_STRING(str_proxy, proxy.c, 1);
smart_str_free(&proxy);
- context = php_stream_context_alloc();
+ if (!context) {
+ context = php_stream_context_alloc();
+ }
php_stream_context_set_option(context, "http", "proxy", str_proxy);
zval_ptr_dtor(&str_proxy);