diff options
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r-- | ext/soap/php_http.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 19aaa53a5..4fe7dfc9d 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c,v 1.77.2.11.2.15 2008/04/08 14:11:49 jorton Exp $ */ +/* $Id: php_http.c,v 1.77.2.11.2.17 2009/01/19 21:57:45 iliaa Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -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"); } |