nextcloud/apps/settings/lib/Controller
Ferdinand Thiessen ccc4d2eb9f
feat: add setup check for request buffering on FPM
Context: Using `Transfer-Encoding: chunked` of HTTP 1.1

PHP-FPM has a bug[1] where the request body is not passed to PHP
if the `Content-Length` header is missing, while FastCGI in general
allows this (I could reproduce that FastCGI passed the request stream
from NGinx) PHP-FPM does not forward this to the PHP application.

This means when using PHP-FPM we get an empty request body and thus
every `PUT` will be an empty file.

I tested that `mod_php` is not affected, while it also has no
`Content-Length` header, it correctly passed the stream and thus also
works without buffering the request.

Only PHP-FPM needs buffering of the request so that a `Content-Length`
header can be generated.

To enable this on Apache set: `SetEnvIfNoCase Transfer-Encoding "chunked" proxy-sendcl=1`
On NGinx: `fastcgi_request_buffering on;`.

[1]: https://github.com/php/php-src/issues/9441
ref: https://github.com/nextcloud/server/issues/7995

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-05 01:06:13 +02:00
..
AdminSettingsController.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
AISettingsController.php fix(taskprocessing): move LAZY_CONFIG_KEYS constant to the private namespace 2025-08-04 10:11:24 +02:00
AppSettingsController.php fix: Deduplicate code by using DependencyAnalyzer in the AppManager 2025-08-18 17:09:40 +02:00
AuthorizedGroupController.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
AuthSettingsController.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
ChangePasswordController.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
CheckSetupController.php feat: add setup check for request buffering on FPM 2025-09-05 01:06:13 +02:00
CommonSettingsTrait.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
DeclarativeSettingsController.php feat: add support for sensitive Declarative settings values encryption 2025-05-28 20:43:04 +03:00
HelpController.php refactor(apps): Use constructor property promotion when possible 2024-10-21 12:37:59 +02:00
LogSettingsController.php fix(settings): Add back adminstration scope for LogSettingsController 2025-01-25 17:16:39 +01:00
MailSettingsController.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
PersonalSettingsController.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
PresetController.php feat(lexicon): set/get current preset from controller 2025-08-26 09:00:04 -01:00
ReasonsController.php refactor(settings): Replace security annotations with respective attributes 2024-07-27 22:49:43 +02:00
TwoFactorSettingsController.php chore: Add SPDX header 2024-06-03 20:33:31 +02:00
UsersController.php feat: add bluesky to accounts, show the same in profile edit and visibility option, in view profile and also in sharing tab 2025-08-08 08:06:45 +00:00
WebAuthnController.php refactor(settings): Replace security annotations with respective attributes 2024-07-27 22:49:43 +02:00