Skip to content
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

[Bug][Swoole] Disable unintentional swoole header formatting by config value #710

Merged
merged 5 commits into from
Jun 21, 2023
Merged

Conversation

NiroDeveloper
Copy link
Contributor

With this Pull Request i want to fix a bug where Swoole is formatting headers names unintentionally.

Swoole and Open Swoole are formatting headers by default.
https://openswoole.com/docs/modules/swoole-http-response-header

It seems odd that octane calles ResponseHeaderBag's allPreserveCase presumably to preserve the casing.

$headers = $response->headers->allPreserveCase();

But few lines later swoole will format it.

$swooleResponse->header($name, $value);

The swoole formatting should be adjustable by config, so it could be behave like Laravel and Symfony by default.
This change is backwards compatible, because the default is still "true".

on-behalf-of: @e-solutions-GmbH info@esolutions.de

@NiroDeveloper NiroDeveloper changed the title [Bug][Swoole] Disable unintentionally swoole header formatting by config value [Bug][Swoole] Disable unintentional swoole header formatting by config value Jun 21, 2023
@taylorotwell taylorotwell merged commit 1685e81 into laravel:2.x Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants