Skip to content

Commit

Permalink
Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting).
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Jan 19, 2009
1 parent 72eeac2 commit a0d1b54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -17,6 +17,7 @@ PHP NEWS
- Fixed bug in xml_error_string() which resulted in messages being
off by one. (Scott)

- Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
- Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
(Etienne, Dmitry)
Expand Down
6 changes: 5 additions & 1 deletion ext/soap/php_http.c
Expand Up @@ -438,7 +438,11 @@ int make_http_soap_request(zval *this_ptr,
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");
}

Expand Down

0 comments on commit a0d1b54

Please sign in to comment.