]> granicus.if.org Git - php/commitdiff
Fixed bug #41635 (SoapServer and zlib.output_compression with FastCGI result in major...
authorDmitry Stogov <dmitry@php.net>
Thu, 1 Nov 2007 13:27:57 +0000 (13:27 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 1 Nov 2007 13:27:57 +0000 (13:27 +0000)
ext/soap/soap.c

index 73930c279f0913a14ffc2f16a58318bab4d84b93..4322d1a6d4b057c801068ce24288ec8310fc94ff 100644 (file)
@@ -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 {