Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpFoundation] Add litespeed_finish_request to Response #42293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thomas2411 opened this issue Jul 27, 2021 · 2 comments
Closed

[HttpFoundation] Add litespeed_finish_request to Response #42293

thomas2411 opened this issue Jul 27, 2021 · 2 comments

Comments

@thomas2411
Copy link
Contributor

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.

@OskarStark
Copy link
Contributor

Can you please open a PR, so we can discuss about the code? Thanks

@thomas2411
Copy link
Contributor Author

Can you please open a PR, so we can discuss about the code? Thanks

Done

@fabpot fabpot closed this as completed Aug 6, 2021
fabpot added a commit that referenced this issue Aug 6, 2021
…sponse` (thomas2411)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[HttpFoundation] Add `litespeed_finish_request` to `Response`

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #42293
| License       | MIT

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.

Commits
-------

5fb91a5 [HttpFoundation] Add `litespeed_finish_request` to `Response`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants