From 363966b4592cacd6ea5da6987e7cbdfcb80ab39d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 1 Nov 2007 13:27:57 +0000 Subject: [PATCH] Fixed bug #41635 (SoapServer and zlib.output_compression with FastCGI result in major slowdown) --- ext/soap/soap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 73930c279f..4322d1a6d4 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2388,8 +2388,12 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade 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, 1); - snprintf(cont_len, sizeof(cont_len), "Content-Length: %d", size); - sapi_add_header(cont_len, strlen(cont_len), 1); + if (zend_ini_long("zlib.output_compression", sizeof("zlib.output_compression"), 0)) { + sapi_add_header("Connection: close", sizeof("Connection: close")-1, 1); + } else { + snprintf(cont_len, sizeof(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); } else { -- 2.50.1