dmitry Tue May 10 04:16:14 2005 EDT
Modified files:
/php-src/ext/soap php_http.c
Log:
"<?xml ..." header is not required by SOAP specification
http://cvs.php.net/diff.php/php-src/ext/soap/php_http.c?r1=1.68&r2=1.69&ty=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.68 php-src/ext/soap/php_http.c:1.69
--- php-src/ext/soap/php_http.c:1.68 Wed Mar 23 03:08:54 2005
+++ php-src/ext/soap/php_http.c Tue May 10 04:16:14 2005
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.68 2005/03/23 08:08:54 dmitry Exp $ */
+/* $Id: php_http.c,v 1.69 2005/05/10 08:16:14 dmitry Exp $ */
#include "php_soap.h"
#include "ext/standard/base64.h"
@@ -230,6 +230,7 @@
char *connection;
int http_1_1;
int http_status;
+ int content_type_xml = 0;
char *content_encoding;
if (this_ptr == NULL || Z_TYPE_P(this_ptr) != IS_OBJECT) {
@@ -962,6 +963,7 @@
}
if (strncmp(content_type, "text/xml", cmplen) == 0 ||
strncmp(content_type, "application/soap+xml", cmplen) == 0)
{
+ content_type_xml = 1;
/*
if (strncmp(http_body, "<?xml", 5)) {
zval *err;
@@ -1032,13 +1034,15 @@
if (*buffer_len == 0) {
error = 1;
} else if (*buffer_len > 0) {
- char *s = *buffer;
+ if (!content_type_xml) {
+ char *s = *buffer;
- while (*s != '\0' && *s < ' ') {
- s++;
- }
- if (strncmp(s, "<?xml", 5)) {
- error = 1;
+ while (*s != '\0' && *s < ' ') {
+ s++;
+ }
+ if (strncmp(s, "<?xml", 5)) {
+ error = 1;
+ }
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php