dmitry Thu Apr 13 08:18:36 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/soap php_http.c soap.c
Log:
Fixed bug #37054 (SoapClient Error Fetching http headers)
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.511&r2=1.2027.2.512&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.511 php-src/NEWS:1.2027.2.512
--- php-src/NEWS:1.2027.2.511 Wed Apr 12 19:30:52 2006
+++ php-src/NEWS Thu Apr 13 08:18:36 2006
@@ -9,6 +9,7 @@
which are unaccessible). (Tony)
- Fixed bug #37055 (incorrect reference counting for persistent OCI8
connections). (Tony)
+- Fixed bug #37054 (SoapClient Error Fetching http headers). (Dmitry)
- Fixed bug #37053 (html_errors with internal classes produces wrong links).
(Tony)
- Fixed bug #37046 (foreach breaks static scope). (Dmitry)
http://cvs.php.net/viewcvs.cgi/php-src/ext/soap/php_http.c?r1=1.77.2.10&r2=1.77.2.11&diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.77.2.10
php-src/ext/soap/php_http.c:1.77.2.11
--- php-src/ext/soap/php_http.c:1.77.2.10 Mon Mar 20 10:36:55 2006
+++ php-src/ext/soap/php_http.c Thu Apr 13 08:18:36 2006
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.77.2.10 2006/03/20 10:36:55 dmitry Exp $ */
+/* $Id: php_http.c,v 1.77.2.11 2006/04/13 08:18:36 dmitry Exp $ */
#include "php_soap.h"
#include "ext/standard/base64.h"
@@ -416,13 +416,22 @@
smart_str_appendc(&soap_headers, ':');
smart_str_append_unsigned(&soap_headers, phpurl->port);
}
- smart_str_append_const(&soap_headers, "\r\n"
- "Connection: Keep-Alive\r\n"
+ smart_str_append_const(&soap_headers, "\r\n"
+ "Connection: Keep-Alive\r\n");
/*
"Connection: close\r\n"
"Accept: text/html; text/xml; text/plain\r\n"
*/
- "User-Agent: PHP SOAP 0.1\r\n");
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent",
sizeof("_user_agent"), (void **)&tmp) == SUCCESS &&
+ Z_TYPE_PP(tmp) == IS_STRING) {
+ if (Z_STRLEN_PP(tmp) > 0) {
+ smart_str_append_const(&soap_headers,
"User-Agent: ");
+ smart_str_appendl(&soap_headers,
Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+ smart_str_append_const(&soap_headers, "\r\n");
+ }
+ } else{
+ smart_str_append_const(&soap_headers, "User-Agent:
PHP-SOAP/"PHP_VERSION"\r\n");
+ }
smart_str_append(&soap_headers, &soap_headers_z);
smart_str_free(&soap_headers_z);
http://cvs.php.net/viewcvs.cgi/php-src/ext/soap/soap.c?r1=1.156.2.24&r2=1.156.2.25&diff_format=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.156.2.24 php-src/ext/soap/soap.c:1.156.2.25
--- php-src/ext/soap/soap.c:1.156.2.24 Sun Apr 9 23:35:51 2006
+++ php-src/ext/soap/soap.c Thu Apr 13 08:18:36 2006
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.156.2.24 2006/04/09 23:35:51 andrei Exp $ */
+/* $Id: soap.c,v 1.156.2.25 2006/04/13 08:18:36 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2284,6 +2284,11 @@
persistent = zend_is_true(*tmp);
}
+ if (zend_hash_find(ht, "user_agent", sizeof("user_agent"),
(void**)&tmp) == SUCCESS &&
+ Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "_user_agent",
Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ }
+
} else if (wsdl == NULL) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "'location' and 'uri'
options are requred in nonWSDL mode");
return;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php