summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-05-10 08:16:14 +0000
committerDmitry Stogov <dmitry@php.net>2005-05-10 08:16:14 +0000
commit61ba13bf728c6a07cb3b99c03060ae7bea7787e3 (patch)
tree4621877133f995757e817b5261c0d41318bb7352
parent05c380119304c90eff40ccde61bb7eda9ba503f9 (diff)
downloadphp-git-61ba13bf728c6a07cb3b99c03060ae7bea7787e3.tar.gz
"<?xml ..." header is not required by SOAP specification
-rw-r--r--ext/soap/php_http.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 7ce8dc9b60..2de0e42237 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -230,6 +230,7 @@ int make_http_soap_request(zval *this_ptr,
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 @@ try_again:
}
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 @@ try_again:
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;
+ }
}
}