From 4aaabdfb8e5cfbde032dc6e33007b5d421f95352 Mon Sep 17 00:00:00 2001 From: Arpad Krejczinger Date: Tue, 19 Aug 2025 22:05:03 +0200 Subject: [PATCH] Fix nginx WebDAV URL encoding and HTTP protocol issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change proxy_pass to preserve original request URI for URL encoding - Add HTTP/1.1 and Connection header fixes for copyparty compatibility - Remove path manipulation that broke files with spaces/special characters Fixes HTTP 400 "bad headers" errors when uploading files with spaces in filenames via WebDAV clients like X-plore. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- config/nginx/homelab.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/nginx/homelab.conf b/config/nginx/homelab.conf index 8bf1877..e049219 100644 --- a/config/nginx/homelab.conf +++ b/config/nginx/homelab.conf @@ -58,7 +58,8 @@ server { # Explicitly allow WebDAV methods limit_except GET POST PUT DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK { deny all; } - proxy_pass http://127.0.0.1:8082/files$1; + # Pass original request URI to preserve URL encoding + proxy_pass http://127.0.0.1:8082; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -84,6 +85,10 @@ server { proxy_buffering off; proxy_request_buffering off; + # Critical: Use HTTP/1.1 and fix connection headers + proxy_http_version 1.1; + proxy_set_header Connection ""; + # Critical: Disable nginx response modifications proxy_redirect off; }