Skip to content

Commit

Permalink
Fixed bug in litespeed_finish_request(), disable fastcgi_finish_reque…
Browse files Browse the repository at this point in the history
…st() alias for now.
  • Loading branch information
George Wang authored and remicollet committed Apr 24, 2019
1 parent a5da240 commit 0a3fb20
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sapi/litespeed/lsapi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ static int sapi_lsapi_activate()
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
"LiteSpeed V7.3",
"LiteSpeed V7.3.1",

php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
Expand Down Expand Up @@ -1406,7 +1406,6 @@ zend_function_entry litespeed_functions[] = {
PHP_FALIAS(getallheaders, litespeed_request_headers, arginfo_litespeed__void)
PHP_FALIAS(apache_request_headers, litespeed_request_headers, arginfo_litespeed__void)
PHP_FALIAS(apache_response_headers, litespeed_response_headers, arginfo_litespeed__void)
PHP_FALIAS(fastcgi_finish_request, litespeed_finish_request, arginfo_litespeed__void)
{NULL, NULL, NULL}
};

Expand Down Expand Up @@ -1542,6 +1541,10 @@ PHP_FUNCTION(litespeed_finish_request)
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}

php_output_end_all();
php_header();

if (LSAPI_End_Response() != -1) {
RETURN_TRUE;
}
Expand Down

0 comments on commit 0a3fb20

Please sign in to comment.