dmitry Tue May 10 04:15:58 2005 EDT Modified files: (Branch: PHP_5_0) /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.55.2.14&r2=1.55.2.15&ty=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.55.2.14 php-src/ext/soap/php_http.c:1.55.2.15 --- php-src/ext/soap/php_http.c:1.55.2.14 Wed Mar 23 03:08:34 2005 +++ php-src/ext/soap/php_http.c Tue May 10 04:15:58 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c,v 1.55.2.14 2005/03/23 08:08:34 dmitry Exp $ */ +/* $Id: php_http.c,v 1.55.2.15 2005/05/10 08:15:58 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