cvs: php-src /ext/soap soap.c
| From: | Dmitry Stogov | Date: | Tue, 20 Jul 2004 07:39:34 +0000 |
| Subject: | cvs: php-src /ext/soap soap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27912@lists.php.net to get a copy of this message | ||
dmitry Tue Jul 20 03:39:34 2004 EDT
Modified files:
/php-src/ext/soap soap.c
Log:
Fixed incorrect HTTP headers in SOAP response
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.113&r2=1.114&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.113 php-src/ext/soap/soap.c:1.114
--- php-src/ext/soap/soap.c:1.113 Mon Jul 19 10:55:35 2004
+++ php-src/ext/soap/soap.c Tue Jul 20 03:39:32 2004
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.113 2004/07/19 14:55:35 dmitry Exp $ */
+/* $Id: soap.c,v 1.114 2004/07/20 07:39:32 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1262,7 +1262,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);
+ 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) {
@@ -1623,11 +1623,11 @@
}
sprintf(cont_len, "Content-Length: %d", size);
- sapi_add_header(cont_len, strlen(cont_len) + 1, 1);
+ 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);
+ 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);
+ sapi_add_header("Content-Type: text/xml; charset=\"utf-8\"",
sizeof("Content-Type: text/xml; charset=\"utf-8\"")-1, 1);
}
xmlFreeDoc(doc_return);
@@ -1707,13 +1707,13 @@
Want to return HTTP 500 but apache wants to over write
our fault code with their own handling... Figure this out later
*/
- sapi_add_header("HTTP/1.1 500 Internal Service Error", sizeof("HTTP/1.1 500
Internal Service Error"), 1);
+ sapi_add_header("HTTP/1.1 500 Internal Service Error", sizeof("HTTP/1.1 500
Internal Service Error")-1, 1);
sprintf(cont_len,"Content-Length: %d", size);
- sapi_add_header(cont_len, strlen(cont_len) + 1, 1);
+ 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);
+ 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);
+ 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);