svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/soap/php_sdl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/soap/php_sdl.c
trunk/ext/soap/php_sdl.c
| From: | Dmitry Stogov | Date: | Mon, 05 Mar 2012 12:59:01 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/soap/php_sdl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/soap/php_sdl.c trunk/ext/soap/php_sdl.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67830@lists.php.net to get a copy of this message | ||
dmitry Mon, 05 Mar 2012 12:59:01 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=323909
Log:
Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header)
Bug: https://bugs.php.net/60887 (Assigned) SoapClient
ignores user_agent option and sends no User-Agent header
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c
U php/php-src/branches/PHP_5_4/NEWS
U php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c
U php/php-src/trunk/ext/soap/php_sdl.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:47:25 UTC (rev 323908)
+++ php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:59:01 UTC (rev 323909)
@@ -41,7 +41,11 @@
- PHP-FPM SAPI:
. Fixed bug #60811 (php-fpm compilation problem). (rasmus)
-
+
+- SOAP
+ . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
+ User-Agent header). (carloschilazo at gmail dot com)
+
- SQLite3 extension:
. Add createCollation() method. (Brad Dewar)
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 2012-03-05 12:47:25 UTC (rev 323908)
+++ php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:59:01 UTC (rev 323909)
@@ -3259,6 +3259,13 @@
context = php_stream_context_alloc();
}
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent",
sizeof("_user_agent"), (void **) &tmp) == SUCCESS &&
+ Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) {
+ smart_str_appends(&headers, "User-Agent: ");
+ smart_str_appends(&headers, Z_STRVAL_PP(tmp));
+ smart_str_appends(&headers, "\r\n");
+ }
+
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 &&
Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS 2012-03-05 12:47:25 UTC (rev 323908)
+++ php/php-src/branches/PHP_5_4/NEWS 2012-03-05 12:59:01 UTC (rev 323909)
@@ -38,6 +38,10 @@
- mbstring:
. MFH mb_ereg_replace_callback() for security enhancements. (Rui)
+- SOAP
+ . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
+ User-Agent header). (carloschilazo at gmail dot com)
+
- Phar
. Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
bytes). (Nikita Popov)
Modified: php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c 2012-03-05 12:47:25 UTC (rev 323908)
+++ php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c 2012-03-05 12:59:01 UTC (rev 323909)
@@ -3259,6 +3259,13 @@
context = php_stream_context_alloc(TSRMLS_C);
}
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent",
sizeof("_user_agent"), (void **) &tmp) == SUCCESS &&
+ Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) {
+ smart_str_appends(&headers, "User-Agent: ");
+ smart_str_appends(&headers, Z_STRVAL_PP(tmp));
+ smart_str_appends(&headers, "\r\n");
+ }
+
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 &&
Modified: php/php-src/trunk/ext/soap/php_sdl.c
===================================================================
--- php/php-src/trunk/ext/soap/php_sdl.c 2012-03-05 12:47:25 UTC (rev 323908)
+++ php/php-src/trunk/ext/soap/php_sdl.c 2012-03-05 12:59:01 UTC (rev 323909)
@@ -3259,6 +3259,13 @@
context = php_stream_context_alloc(TSRMLS_C);
}
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent",
sizeof("_user_agent"), (void **) &tmp) == SUCCESS &&
+ Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) {
+ smart_str_appends(&headers, "User-Agent: ");
+ smart_str_appends(&headers, Z_STRVAL_PP(tmp));
+ smart_str_appends(&headers, "\r\n");
+ }
+
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 &&