summaryrefslogtreecommitdiff
path: root/ext/soap/php_http.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-01-19 21:57:46 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-01-19 21:57:46 +0000
commita0d1b54bf13e28a656ab3699d12058e988d7475c (patch)
tree80657bdc52b97977d2253525253eb1f513516e20 /ext/soap/php_http.c
parent72eeac2581b47b0b662b1c3a03cf88a7f6939fee (diff)
downloadphp-git-a0d1b54bf13e28a656ab3699d12058e988d7475c.tar.gz
Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting).
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r--ext/soap/php_http.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index dca37476e7..4ff4ed9577 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -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");
}