Skip to content

[HttpFoundation] Add litespeed_finish_request to Response #42293

Closed
@thomas2411

Description

@thomas2411

For now Litespeed has dropped support for fastcgi_finish_request function due to some problems: php/php-src@ccf051c so when Litespeed is being used on a server instead of Apache, then there is no possibility to use fastcgi_finish_request function as the alias for litespeed_finish_request is turned off.

So in Symfony\Component\HttpFoundation\Response in line 398

I would like to add a new if statement to support it:

    if (\function_exists('fastcgi_finish_request')) {
        fastcgi_finish_request();
    } elseif (\function_exists('litespeed_finish_request')) {
        litespeed_finish_request();
    } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
        static::closeOutputBuffers(0, true);
    }

I have forked the symfony/symfony repository and added the code, tested on a server. If you agree to add it I can make a PullRequest.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions