]> granicus.if.org Git - php/commitdiff
Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 19 Jan 2009 21:57:46 +0000 (21:57 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 19 Jan 2009 21:57:46 +0000 (21:57 +0000)
NEWS
ext/soap/php_http.c

diff --git a/NEWS b/NEWS
index 98c21db1830aba15ec5bfe8908b001f1083b813d..fde8dd18c160fb9e5d663a536b2f4b54e1cc94a5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ PHP                                                                        NEWS
 - Fixed bug in xml_error_string() which resulted in messages being
   off by one. (Scott)
 
+- Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
 - Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
 - Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
   (Etienne, Dmitry)
index dca37476e70d05e051944d5082f62f8db030703c..4ff4ed9577d7c67b00a98be757f0f0705298b09f 100644 (file)
@@ -438,7 +438,11 @@ try_again:
                                smart_str_appendl(&soap_headers, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
                                smart_str_append_const(&soap_headers, "\r\n");
                        }
-               } else{
+               } else if (FG(user_agent)) {
+                       smart_str_append_const(&soap_headers, "User-Agent: ");
+                       smart_str_appends(&soap_headers, FG(user_agent));
+                       smart_str_append_const(&soap_headers, "\r\n");
+               } else {
                        smart_str_append_const(&soap_headers, "User-Agent: PHP-SOAP/"PHP_VERSION"\r\n");
                }