diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-02-15 14:45:42 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-02-15 14:45:42 +0000 |
commit | f27c1b9d07f05c49cbcabc5637a2da223885886b (patch) | |
tree | e1908b8c8ad4edf6a785e9040add90559578bc03 /sapi/cgi/cgi_main.c | |
parent | d161f4ec8816f8a0b30a41aa2e8c4d333c6b9971 (diff) | |
download | php-git-f27c1b9d07f05c49cbcabc5637a2da223885886b.tar.gz |
optimization
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r-- | sapi/cgi/cgi_main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 4277ed05cc..257e6fcbb4 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -756,7 +756,17 @@ static int sapi_cgi_deactivate(TSRMLS_D) 2. When the first call occurs and the request is not set up, flush fails on FastCGI. */ if (SG(sapi_started)) { - sapi_cgibin_flush(SG(server_context)); + if (fcgi_is_fastcgi()) { + if ( +#ifndef PHP_WIN32 + !parent && +#endif + !fcgi_finish_request((fcgi_request*)SG(server_context))) { + php_handle_aborted_connection(); + } + } else { + sapi_cgibin_flush(SG(server_context)); + } } return SUCCESS; } |