summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-01-19 21:58:13 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-01-19 21:58:13 +0000
commitca5cd2f52b2c919f50fef7011ed303e2744a00ec (patch)
tree6585fc21fe534a5ddd358e5da64a3016e1df0b92
parent381f6e28ba5a4dafce5bf8a49ad30e4177a7ceec (diff)
downloadphp-git-ca5cd2f52b2c919f50fef7011ed303e2744a00ec.tar.gz
MFB: Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting).
-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 7a67780c3f..daebaff315 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -437,7 +437,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");
}