diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-02-06 10:16:15 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-02-06 10:16:15 +0000 |
| commit | 529a315637867cc715a2113d8df0669fbdea7f5d (patch) | |
| tree | bfcd1cc5e79485919757bd74a3bb6f0ff6a2e30c /ext/soap/php_http.c | |
| parent | 98c15023eb101460516205e324763f685ed64269 (diff) | |
| download | php-git-529a315637867cc715a2113d8df0669fbdea7f5d.tar.gz | |
Fixed bug #36283 (SOAPClient Compression Broken).
Diffstat (limited to 'ext/soap/php_http.c')
| -rw-r--r-- | ext/soap/php_http.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 0be169c4ab..2cbf5801f2 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -223,6 +223,7 @@ int make_http_soap_request(zval *this_ptr, { 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 make_http_soap_request(zval *this_ptr, 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 @@ int make_http_soap_request(zval *this_ptr, 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 && @@ -420,6 +421,10 @@ try_again: "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) { |
