dmitry Thu Nov 4 10:30:28 2004 EDT
Modified files:
/php-src/ext/soap php_http.c soap.c
Log:
Fixed bug #30685 (Malformed SOAPClient http header reequest).
http://cvs.php.net/diff.php/php-src/ext/soap/php_http.c?r1=1.56&r2=1.57&ty=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.56 php-src/ext/soap/php_http.c:1.57
--- php-src/ext/soap/php_http.c:1.56 Fri Sep 17 08:44:55 2004
+++ php-src/ext/soap/php_http.c Thu Nov 4 10:30:28 2004
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.56 2004/09/17 12:44:55 wez Exp $ */
+/* $Id: php_http.c,v 1.57 2004/11/04 15:30:28 dmitry Exp $ */
#include "php_soap.h"
#include "ext/standard/base64.h"
@@ -388,14 +388,15 @@
*/
"User-Agent: PHP SOAP 0.1\r\n");
if (soap_version == SOAP_1_2) {
- smart_str_append_const(&soap_headers,"Content-Type:
application/soap+xml; charset=\"utf-8");
+ smart_str_append_const(&soap_headers,"Content-Type:
application/soap+xml; charset=utf-8");
if (soapaction) {
- smart_str_append_const(&soap_headers,"\"; action=\"");
+ smart_str_append_const(&soap_headers,"; action=\"");
smart_str_appends(&soap_headers, soapaction);
+ smart_str_append_const(&soap_headers,"\"");
}
- smart_str_append_const(&soap_headers,"\"\r\n");
+ smart_str_append_const(&soap_headers,"\r\n");
} else {
- smart_str_append_const(&soap_headers,"Content-Type: text/xml;
charset=\"utf-8\"\r\n");
+ smart_str_append_const(&soap_headers,"Content-Type: text/xml;
charset=utf-8\r\n");
if (soapaction) {
smart_str_append_const(&soap_headers, "SOAPAction:
\"");
smart_str_appends(&soap_headers, soapaction);
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.122&r2=1.123&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.122 php-src/ext/soap/soap.c:1.123
--- php-src/ext/soap/soap.c:1.122 Thu Sep 16 04:12:27 2004
+++ php-src/ext/soap/soap.c Thu Nov 4 10:30:28 2004
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.122 2004/09/16 08:12:27 dmitry Exp $ */
+/* $Id: soap.c,v 1.123 2004/11/04 15:30:28 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1296,7 +1296,7 @@
INIT_ZVAL(readfile_ret);
MAKE_STD_ZVAL(param);
- sapi_add_header("Content-Type:
text/xml; charset=\"utf-8\"", sizeof("Content-Type: text/xml; charset=\"utf-8\"")-1,
1);
+ sapi_add_header("Content-Type:
text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
ZVAL_STRING(param,
service->sdl->source, 1);
ZVAL_STRING(&readfile, "readfile", 1);
if
(call_user_function(EG(function_table), NULL, &readfile, &readfile_ret, 1, ¶m
TSRMLS_CC) == FAILURE) {
@@ -1312,7 +1312,7 @@
} else {
soap_server_fault("Server", "WSDL
generation is not supported yet", NULL, NULL, NULL TSRMLS_CC);
/*
- sapi_add_header("Content-Type:
text/xml; charset=\"utf-8\"", sizeof("Content-Type: text/xml; charset=\"utf-8\""), 1);
+ sapi_add_header("Content-Type:
text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8"), 1);
PUTS("<?xml version=\"1.0\"
?>\n<definitions\n");
PUTS("
xmlns=\"http://schemas.xmlsoap.org/wsdl/\"\n");
PUTS(" targetNamespace=\"");
@@ -1661,9 +1661,9 @@
sprintf(cont_len, "Content-Length: %d", size);
sapi_add_header(cont_len, strlen(cont_len), 1);
if (soap_version == SOAP_1_2) {
- sapi_add_header("Content-Type: application/soap+xml;
charset=\"utf-8\"", sizeof("Content-Type: application/soap+xml; charset=\"utf-8\"")-1,
1);
+ sapi_add_header("Content-Type: application/soap+xml; charset=utf-8",
sizeof("Content-Type: application/soap+xml; charset=utf-8")-1, 1);
} else {
- sapi_add_header("Content-Type: text/xml; charset=\"utf-8\"",
sizeof("Content-Type: text/xml; charset=\"utf-8\"")-1, 1);
+ sapi_add_header("Content-Type: text/xml; charset=utf-8",
sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
}
xmlFreeDoc(doc_return);
@@ -1748,9 +1748,9 @@
sprintf(cont_len,"Content-Length: %d", size);
sapi_add_header(cont_len, strlen(cont_len), 1);
if (soap_version == SOAP_1_2) {
- sapi_add_header("Content-Type: application/soap+xml;
charset=\"utf-8\"", sizeof("Content-Type: application/soap+xml; charset=\"utf-8\"")-1,
1);
+ sapi_add_header("Content-Type: application/soap+xml; charset=utf-8",
sizeof("Content-Type: application/soap+xml; charset=utf-8")-1, 1);
} else {
- sapi_add_header("Content-Type: text/xml; charset=\"utf-8\"",
sizeof("Content-Type: text/xml; charset=\"utf-8\"")-1, 1);
+ sapi_add_header("Content-Type: text/xml; charset=utf-8",
sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
}
php_write(buf, size TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php