dmitry Mon Feb 6 10:16:03 2006 UTC Modified files: (Branch: PHP_5_1) /php-src NEWS /php-src/ext/soap php_http.c Log: Fixed bug #36283 (SOAPClient Compression Broken). http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.401&r2=1.2027.2.402&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.401 php-src/NEWS:1.2027.2.402 --- php-src/NEWS:1.2027.2.401 Sun Feb 5 19:23:29 2006 +++ php-src/NEWS Mon Feb 6 10:16:03 2006 @@ -22,6 +22,7 @@ on error. (Pierre) - Fixed bug #36295 (typo in SplFileObject::flock() parameter name). (Tony) - Fixed bug #36287 (Segfault with SplFileInfo conversion). (Marcus) +- Fixed bug #36283 (SOAPClient Compression Broken). (Dmitry) - Fixed bug #36268 (Object destructors called even after fatal errors). (Dmitry) - Fixed bug #36258 (SplFileObject::getPath() may lead to segfault). (Tony) - Fixed bug #36242 (Possible memory corruption in stream_select()). (Tony) http://cvs.php.net/viewcvs.cgi/php-src/ext/soap/php_http.c?r1=1.77.2.6&r2=1.77.2.7&diff_format=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.77.2.6 php-src/ext/soap/php_http.c:1.77.2.7 --- php-src/ext/soap/php_http.c:1.77.2.6 Sun Jan 1 12:50:13 2006 +++ php-src/ext/soap/php_http.c Mon Feb 6 10:16:03 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c,v 1.77.2.6 2006/01/01 12:50:13 sniper Exp $ */ +/* $Id: php_http.c,v 1.77.2.7 2006/02/06 10:16:03 dmitry Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -223,6 +223,7 @@ { char *request; smart_str soap_headers = {0}; + smart_str soap_headers_z = {0}; int request_size, err; php_url *phpurl = NULL; php_stream *stream; @@ -250,7 +251,7 @@ int kind = Z_LVAL_PP(tmp) & SOAP_COMPRESSION_DEFLATE; if ((Z_LVAL_PP(tmp) & SOAP_COMPRESSION_ACCEPT) != 0) { - smart_str_append_const(&soap_headers,"Accept-Encoding: gzip, deflate\r\n"); + smart_str_append_const(&soap_headers_z,"Accept-Encoding: gzip, deflate\r\n"); } if (level > 0) { zval func; @@ -270,11 +271,11 @@ if (kind == SOAP_COMPRESSION_DEFLATE) { n = 2; ZVAL_STRING(&func, "gzcompress", 0); - smart_str_append_const(&soap_headers,"Content-Encoding: deflate\r\n"); + smart_str_append_const(&soap_headers_z,"Content-Encoding: deflate\r\n"); } else { n = 3; ZVAL_STRING(&func, "gzencode", 0); - smart_str_append_const(&soap_headers,"Content-Encoding: gzip\r\n"); + smart_str_append_const(&soap_headers_z,"Content-Encoding: gzip\r\n"); ZVAL_LONG(params[2], 1); } if (call_user_function(CG(function_table), (zval**)NULL, &func, &retval, n, params TSRMLS_CC) == SUCCESS && @@ -413,13 +414,17 @@ smart_str_appendc(&soap_headers, ':'); smart_str_append_unsigned(&soap_headers, phpurl->port); } - smart_str_append_const(&soap_headers, "\r\n" + smart_str_append_const(&soap_headers, "\r\n" "Connection: Keep-Alive\r\n" /* "Connection: close\r\n" "Accept: text/html; text/xml; text/plain\r\n" */ "User-Agent: PHP SOAP 0.1\r\n"); + + smart_str_append(&soap_headers, &soap_headers_z); + smart_str_free(&soap_headers_z); + if (soap_version == SOAP_1_2) { smart_str_append_const(&soap_headers,"Content-Type: application/soap+xml; charset=utf-8"); if (soapaction) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php