On Mon, Mar 5, 2012 at 13:59, Dmitry Stogov <dmi...@php.net> wrote: > 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"); > + }
Shouldn't it fallback on the ini option? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php