From: Dmitry Stogov Date: Tue, 13 Jan 2004 09:31:50 +0000 (+0000) Subject: XML parsing warnings and notices were disabled. X-Git-Tag: php_ibase_before_split~246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fceb95f12a0dcda2413d8938c2589f6dd9e9cb3f;p=php XML parsing warnings and notices were disabled. --- diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 865161b9f0..d93568429e 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -306,7 +306,7 @@ int get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRMLS http_close = TRUE; connection = get_http_header_value(http_headers,"Connection: "); if (connection) { - if (!strcmp(connection, "Keep-Alive")) { + if (strncasecmp(connection, "Keep-Alive", sizeof("Keep-Alive")-1) == 0) { http_close = FALSE; } efree(connection); @@ -331,7 +331,8 @@ int get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRMLS cmplen = strlen(content_type); } - if (strncmp(content_type, "text/xml", cmplen)) { + if (strncmp(content_type, "text/xml", cmplen) == 0 || + strncmp(content_type, "application/soap+xml", cmplen == 0)) { if (strncmp(http_body, "type==IS_STRING)) { + int old_error_reporting = EG(error_reporting); + EG(error_reporting) &= ~(E_WARNING|E_NOTICE|E_USER_WARNING|E_USER_NOTICE); + doc_request = xmlParseMemory(Z_STRVAL_PP(raw_post),Z_STRLEN_PP(raw_post)); xmlCleanupParser(); + EG(error_reporting) = old_error_reporting; + if (doc_request == NULL) { php_error(E_ERROR, "Bad Request"); }