summaryrefslogtreecommitdiff
path: root/ext/soap/php_http.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-01-19 21:58:02 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-01-19 21:58:02 +0000
commit2b456001daa4f123ec01b182f079a20917e27c59 (patch)
tree159d622b51a4a490516067cf0287daa94b72bc21 /ext/soap/php_http.c
parent390ccd899d73101ad5ddcfc46074a6c83ec178e8 (diff)
downloadphp-git-2b456001daa4f123ec01b182f079a20917e27c59.tar.gz
MFB: 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 bc975a22bc..42c939bdb2 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -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");
}