Skip to content

Commit

Permalink
Buffer chunked requests
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Jan 23, 2024
1 parent 7f1b980 commit 3e8cd1d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,16 @@
RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

# Chunked request arrive to Nextcloud with no "Content-Length" header.
# This breaks upload from 3rdparty client like xDavv5 on Android, or Cyberduck.
# This directive will force the problematic requests to be chunked before being forwarded to Nextcloud.
# This way, the "Transfer-Encoding" header is remove, and the "Content-Length" header is set.
# Here is more information about the issue: https://docs.cyberduck.io/mountainduck/issues/fastcgi/
<IfModule setenvif.c>
<Location "/remote.php">
SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1
</Location>
</IfModule>

AddDefaultCharset utf-8
Options -Indexes

0 comments on commit 3e8cd1d

Please sign in to comment.