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

index bc975a22bc308ce3e67ab37b3b4db72e918a16ec..42c939bdb20ffabbd40f715a1ad4d002b9ce7ad2 100644 (file)
@@ -436,7 +436,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");
                }