diff options
author | Dmitry Stogov <dmitry@zend.com> | 2012-03-21 16:42:08 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2012-03-21 16:42:08 +0400 |
commit | a8cc0b05b45110ccf408ea9410447bf82b8826f2 (patch) | |
tree | e0cae83e715042a6122cac2fbe736f48158a94ae /ext/soap/php_sdl.c | |
parent | 1e18f11c9ab56fb120c9e26ecd3f68f0651cddde (diff) | |
parent | 657547f8c4758efcf85c73fec6d7fd8b3983d7cb (diff) | |
download | php-git-a8cc0b05b45110ccf408ea9410447bf82b8826f2.tar.gz |
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
Fixed bug #49853 (Soap Client stream context header option ignored)
Conflicts:
NEWS
ext/soap/php_sdl.c
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r-- | ext/soap/php_sdl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index eeedc510f1..d250850786 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -3196,6 +3196,8 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) smart_str headers = {0}; char* key = NULL; time_t t = time(0); + zend_bool has_proxy_authorization = 0; + zend_bool has_authorization = 0; if (strchr(uri,':') != NULL || IS_ABSOLUTE_PATH(uri, uri_len)) { uri_len = strlen(uri); @@ -3299,10 +3301,10 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) zval_ptr_dtor(&str_proxy); } - proxy_authentication(this_ptr, &headers TSRMLS_CC); + has_proxy_authorization = proxy_authentication(this_ptr, &headers TSRMLS_CC); } - basic_authentication(this_ptr, &headers TSRMLS_CC); + has_authorization = basic_authentication(this_ptr, &headers TSRMLS_CC); /* Use HTTP/1.1 with "Connection: close" by default */ if (php_stream_context_get_option(context, "http", "protocol_version", &tmp) == FAILURE) { @@ -3311,7 +3313,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) ZVAL_DOUBLE(http_version, 1.1); php_stream_context_set_option(context, "http", "protocol_version", http_version); zval_ptr_dtor(&http_version); - smart_str_appendl(&headers, "Connection: close", sizeof("Connection: close")-1); + smart_str_appendl(&headers, "Connection: close\r\n", sizeof("Connection: close\r\n")-1); } if (headers.len > 0) { @@ -3319,6 +3321,8 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) if (!context) { context = php_stream_context_alloc(TSRMLS_C); + } else { + http_context_headers(context, has_authorization, has_proxy_authorization, 0, &headers TSRMLS_CC); } smart_str_0(&headers); |