mirror of
https://github.com/nextcloud/server.git
synced 2026-06-19 05:32:22 -04:00
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> |
||
|---|---|---|
| .. | ||
| composer | ||
| autoload.php | ||
| composer.json | ||
| composer.lock | ||