Skip to content

Commit

Permalink
Merge pull request #43129 from nextcloud/backport/43047/stable28
Browse files Browse the repository at this point in the history
[stable28] Buffer chunked requests
  • Loading branch information
szaimen authored Feb 2, 2024
2 parents 477f6f1 + 2367b57 commit dce5df4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,19 @@
RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

# Clients like xDavv5 on Android, or Cyberduck, use chunked requests.
# When FastCGI or FPM is used with apache, requests arrive to Nextcloud without any content.
# This leads to the creation of empty files.
# The following directive will force the problematic requests to be buffered before being forwarded to Nextcloud.
# This way, the "Transfer-Encoding" header is removed, the "Content-Length" header is set, and the request content is proxied to Nextcloud.
# Here are more information about the issue:
# - https://docs.cyberduck.io/mountainduck/issues/fastcgi/
# - https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-webdav
<IfModule setenvif.c>
<Location "/remote.php">
SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1
</Location>
</IfModule>

AddDefaultCharset utf-8
Options -Indexes

0 comments on commit dce5df4

Please sign in to comment.