[GH-ISSUE #608] Some files failed to upload with reverse proxy #361

Closed
opened 2026-04-08 16:52:20 +03:00 by zhus · 3 comments
Owner

Originally created by @Cusox on GitHub (Aug 7, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/608

Problem

When using reverse proxy, some files upload successfully, but others return a 401 status code.

When using http + port, the files all upload successfully.

Configuration

compose.yaml:

services:
  dufs:
    command: /data -A -a user:password@/:rw
    container_name: dufs
    image: sigoden/dufs
    ports:
      - '5000:5000'
    restart: unless-stopped
    user: '3000:3000'
    volumes:
      - /mnt/main:/data

Log

dufs logs:

2025-08-07 13:02:37.682455+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android" 401
2025-08-07 13:02:37.711594+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android" 207
2025-08-07 13:02:37.738020+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android/user_0" 401
2025-08-07 13:02:37.765620+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android/user_0" 207
2025-08-07 13:02:38.165462+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/apk.tar.zst" 401
2025-08-07 13:02:38.478636+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/user.tar.zst" 401
2025-08-07 13:02:38.658339+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/user_de.tar.zst" 401
2025-08-07 13:02:38.689122+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/user_de.tar.zst" 201
2025-08-07 13:02:38.817977+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/data.tar.zst" 401
2025-08-07 13:02:38.850912+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/data.tar.zst" 201

caddy logs:

{"level":"debug","ts":1754572970.1886294,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.1890445,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000380114,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":401}
{"level":"debug","ts":1754572970.2149937,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.2155194,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000492375,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android","headers":{"Authorization":["REDACTED"],"Accept-Encoding":["gzip"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"User-Agent":["okhttp/4.12.0"],"Depth":["0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["388"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":207}
{"level":"debug","ts":1754572970.2424028,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.242824,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000381538,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps","headers":{"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"],"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"]},"status":401}
{"level":"debug","ts":1754572970.26973,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.2703028,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000541968,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps","headers":{"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Authorization":["REDACTED"],"Accept-Encoding":["gzip"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["390"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":207}
{"level":"debug","ts":1754572970.2979681,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.2982879,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000289989,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":401}
{"level":"debug","ts":1754572970.3226988,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.3232994,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00056074,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android","headers":{"Depth":["0"],"Authorization":["REDACTED"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["423"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":207}
{"level":"debug","ts":1754572970.3477893,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.3482153,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00038279,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0","headers":{"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":401}
{"level":"debug","ts":1754572970.3731985,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.3737445,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000511466,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Authorization":["REDACTED"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Date":["Thu, 07 Aug 2025 13:22:49 GMT"],"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["418"]},"status":207}
{"level":"debug","ts":1754572970.8319938,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572970.8646617,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.032623073,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/apk.tar.zst","headers":{"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Content-Length":["17625088"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"error":"readfrom tcp 172.18.0.7:41598->192.168.31.210:5000: write tcp 172.18.0.7:41598->192.168.31.210:5000: write: broken pipe"}
{"level":"error","ts":1754572970.8647234,"logger":"http.log.error","msg":"readfrom tcp 172.18.0.7:41598->192.168.31.210:5000: write tcp 172.18.0.7:41598->192.168.31.210:5000: write: broken pipe","request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/apk.tar.zst","headers":{"Content-Length":["17625088"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"duration":0.032746447,"status":502,"err_id":"xp9kqbw2q","err_trace":"reverseproxy.statusError (reverseproxy.go:1373)"}
{"level":"debug","ts":1754572971.1559439,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572971.1817517,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.025771397,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user.tar.zst","headers":{"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Content-Length":["36432"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"error":"readfrom tcp 172.18.0.7:37014->192.168.31.210:5000: write tcp 172.18.0.7:37014->192.168.31.210:5000: write: broken pipe"}
{"level":"error","ts":1754572971.1818051,"logger":"http.log.error","msg":"readfrom tcp 172.18.0.7:37014->192.168.31.210:5000: write tcp 172.18.0.7:37014->192.168.31.210:5000: write: broken pipe","request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user.tar.zst","headers":{"Content-Length":["36432"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"duration":0.025873128,"status":502,"err_id":"bw6b70bc7","err_trace":"reverseproxy.statusError (reverseproxy.go:1373)"}
{"level":"debug","ts":1754572971.310846,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572971.3117595,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000882821,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user_de.tar.zst","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Content-Length":["169"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:50 GMT"],"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8abe1cf9a3cd18f433352f20f5bac\", qop=\"auth\"","Basic realm=\"DUFS\""]},"status":401}
{"level":"debug","ts":1754572971.3366408,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572971.337185,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00051612,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user_de.tar.zst","headers":{"User-Agent":["okhttp/4.12.0"],"Authorization":["REDACTED"],"Content-Length":["169"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Accept-Encoding":["gzip"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:51 GMT"]},"status":201}
{"level":"debug","ts":1754572971.4848077,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572971.4852052,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00036019,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/data.tar.zst","headers":{"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"User-Agent":["okhttp/4.12.0"],"Content-Length":["130"],"Accept-Encoding":["gzip"],"X-Forwarded-For":["192.168.31.3"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Date":["Thu, 07 Aug 2025 13:22:50 GMT"],"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8abe1cf9a3cd18f433352f20f5bac\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"]},"status":401}
{"level":"debug","ts":1754572971.5111306,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1}
{"level":"debug","ts":1754572971.511741,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000571056,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/data.tar.zst","headers":{"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Authorization":["REDACTED"],"Content-Length":["130"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:51 GMT"]},"status":201}

Environment Information

  • Dufs version: 0.43.0
  • Webdav info: Android-DataBackup webdav client
  • Proxy server (if any): caddy
Originally created by @Cusox on GitHub (Aug 7, 2025). Original GitHub issue: https://github.com/sigoden/dufs/issues/608 **Problem** When using reverse proxy, some files upload successfully, but others return a 401 status code. When using http + port, the files all upload successfully. **Configuration** compose.yaml: ```yaml services: dufs: command: /data -A -a user:password@/:rw container_name: dufs image: sigoden/dufs ports: - '5000:5000' restart: unless-stopped user: '3000:3000' volumes: - /mnt/main:/data ``` **Log** dufs logs: ``` 2025-08-07 13:02:37.682455+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android" 401 2025-08-07 13:02:37.711594+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android" 207 2025-08-07 13:02:37.738020+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android/user_0" 401 2025-08-07 13:02:37.765620+00:002025-08-07T13:02:37Z INFO - 192.168.31.211 "PROPFIND /webdav/Android/apps/com.github.android/user_0" 207 2025-08-07 13:02:38.165462+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/apk.tar.zst" 401 2025-08-07 13:02:38.478636+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/user.tar.zst" 401 2025-08-07 13:02:38.658339+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/user_de.tar.zst" 401 2025-08-07 13:02:38.689122+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/user_de.tar.zst" 201 2025-08-07 13:02:38.817977+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/data.tar.zst" 401 2025-08-07 13:02:38.850912+00:002025-08-07T13:02:38Z INFO - 192.168.31.211 "PUT /webdav/Android/apps/com.github.android/user_0/data.tar.zst" 201 ``` caddy logs: ``` {"level":"debug","ts":1754572970.1886294,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.1890445,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000380114,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":401} {"level":"debug","ts":1754572970.2149937,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.2155194,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000492375,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android","headers":{"Authorization":["REDACTED"],"Accept-Encoding":["gzip"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"User-Agent":["okhttp/4.12.0"],"Depth":["0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["388"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":207} {"level":"debug","ts":1754572970.2424028,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.242824,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000381538,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps","headers":{"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"],"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"]},"status":401} {"level":"debug","ts":1754572970.26973,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.2703028,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000541968,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps","headers":{"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Authorization":["REDACTED"],"Accept-Encoding":["gzip"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["390"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":207} {"level":"debug","ts":1754572970.2979681,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.2982879,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000289989,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":401} {"level":"debug","ts":1754572970.3226988,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.3232994,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00056074,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android","headers":{"Depth":["0"],"Authorization":["REDACTED"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["423"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":207} {"level":"debug","ts":1754572970.3477893,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.3482153,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00038279,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0","headers":{"Depth":["0"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8aa46fa3dce7dbd7e28afabd900f2\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:49 GMT"]},"status":401} {"level":"debug","ts":1754572970.3731985,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.3737445,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000511466,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PROPFIND","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Depth":["0"],"Authorization":["REDACTED"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Date":["Thu, 07 Aug 2025 13:22:49 GMT"],"Content-Type":["application/xml; charset=utf-8"],"Content-Length":["418"]},"status":207} {"level":"debug","ts":1754572970.8319938,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572970.8646617,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.032623073,"request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/apk.tar.zst","headers":{"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Content-Length":["17625088"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"error":"readfrom tcp 172.18.0.7:41598->192.168.31.210:5000: write tcp 172.18.0.7:41598->192.168.31.210:5000: write: broken pipe"} {"level":"error","ts":1754572970.8647234,"logger":"http.log.error","msg":"readfrom tcp 172.18.0.7:41598->192.168.31.210:5000: write tcp 172.18.0.7:41598->192.168.31.210:5000: write: broken pipe","request":{"remote_ip":"192.168.31.3","remote_port":"38122","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/apk.tar.zst","headers":{"Content-Length":["17625088"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"duration":0.032746447,"status":502,"err_id":"xp9kqbw2q","err_trace":"reverseproxy.statusError (reverseproxy.go:1373)"} {"level":"debug","ts":1754572971.1559439,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572971.1817517,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.025771397,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user.tar.zst","headers":{"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Content-Length":["36432"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"error":"readfrom tcp 172.18.0.7:37014->192.168.31.210:5000: write tcp 172.18.0.7:37014->192.168.31.210:5000: write: broken pipe"} {"level":"error","ts":1754572971.1818051,"logger":"http.log.error","msg":"readfrom tcp 172.18.0.7:37014->192.168.31.210:5000: write tcp 172.18.0.7:37014->192.168.31.210:5000: write: broken pipe","request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user.tar.zst","headers":{"Content-Length":["36432"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"duration":0.025873128,"status":502,"err_id":"bw6b70bc7","err_trace":"reverseproxy.statusError (reverseproxy.go:1373)"} {"level":"debug","ts":1754572971.310846,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572971.3117595,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000882821,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user_de.tar.zst","headers":{"X-Forwarded-Host":["pan.cusox.net"],"Content-Length":["169"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:50 GMT"],"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8abe1cf9a3cd18f433352f20f5bac\", qop=\"auth\"","Basic realm=\"DUFS\""]},"status":401} {"level":"debug","ts":1754572971.3366408,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572971.337185,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00051612,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/user_de.tar.zst","headers":{"User-Agent":["okhttp/4.12.0"],"Authorization":["REDACTED"],"Content-Length":["169"],"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Accept-Encoding":["gzip"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:51 GMT"]},"status":201} {"level":"debug","ts":1754572971.4848077,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572971.4852052,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.00036019,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/data.tar.zst","headers":{"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"User-Agent":["okhttp/4.12.0"],"Content-Length":["130"],"Accept-Encoding":["gzip"],"X-Forwarded-For":["192.168.31.3"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Date":["Thu, 07 Aug 2025 13:22:50 GMT"],"Allow":["GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE,CHECKAUTH,LOGOUT"],"Dav":["1, 2, 3"],"Www-Authenticate":["Digest realm=\"DUFS\", nonce=\"6894a8abe1cf9a3cd18f433352f20f5bac\", qop=\"auth\"","Basic realm=\"DUFS\""],"Content-Length":["0"]},"status":401} {"level":"debug","ts":1754572971.5111306,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.31.210:5000","total_upstreams":1} {"level":"debug","ts":1754572971.511741,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.31.210:5000","duration":0.000571056,"request":{"remote_ip":"192.168.31.3","remote_port":"38130","client_ip":"192.168.31.3","proto":"HTTP/2.0","method":"PUT","host":"pan.cusox.net","uri":"/webdav/Android/apps/com.github.android/user_0/data.tar.zst","headers":{"X-Forwarded-For":["192.168.31.3"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["pan.cusox.net"],"Authorization":["REDACTED"],"Content-Length":["130"],"Accept-Encoding":["gzip"],"User-Agent":["okhttp/4.12.0"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"pan.cusox.net"}},"headers":{"Content-Length":["0"],"Date":["Thu, 07 Aug 2025 13:22:51 GMT"]},"status":201} ``` **Environment Information** - Dufs version: 0.43.0 - Webdav info: [Android-DataBackup](https://github.com/XayahSuSuSu/Android-DataBackup) webdav client - Proxy server (if any): caddy
zhus closed this issue 2026-04-08 16:52:21 +03:00
Author
Owner

@sigoden commented on GitHub (Aug 7, 2025):

Sorry, I cannot confim the bug.

You need to confirm whether the file has been uploaded correctly. The logs don't show any issues.

When using HTTP Digest Authentication, there are usually two HTTP requests:

  1. The client sends the first request (without authentication information) → the server responds with 401 Unauthorized.
  2. The client constructs a request containing the Digest authentication information based on the WWW-Authenticate header in the 401 response → the server responds with 200 OK (or another success status).

So it's normal to encounter 401.

<!-- gh-comment-id:3164499739 --> @sigoden commented on GitHub (Aug 7, 2025): Sorry, I cannot confim the bug. You need to confirm whether the file has been uploaded correctly. The logs don't show any issues. When using HTTP Digest Authentication, there are usually two HTTP requests: 1. The client sends the first request (without authentication information) → the server responds with 401 Unauthorized. 2. The client constructs a request containing the Digest authentication information based on the WWW-Authenticate header in the 401 response → the server responds with 200 OK (or another success status). So it's normal to encounter 401.
Author
Owner

@Cusox commented on GitHub (Aug 7, 2025):

Sorry, I cannot confim the bug.对不起,我无法确认该错误。

You need to confirm whether the file has been uploaded correctly. The logs don't show any issues.您需要确认文件是否已正确上传。日志没有显示任何问题。

When using HTTP Digest Authentication, there are usually two HTTP requests:使用 HTTP 摘要验证时,通常有两个 HTTP 请求:

  1. The client sends the first request (without authentication information) → the server responds with 401 Unauthorized.客户端发送第一个请求(不含身份验证信息)→服务器回复 401 未授权。
  2. The client constructs a request containing the Digest authentication information based on the WWW-Authenticate header in the 401 response → the server responds with 200 OK (or another success status).客户端根据 401 响应中的 WWW-Authenticate 标头构建一个包含摘要验证信息的请求→服务器以 200 OK(或其他成功状态)作为响应。

So it's normal to encounter 401.因此,遇到 401 是很正常的。

@sigoden Thanks for your reply! Actually, only the file user_de.tar.zst and data.tar.zst uploaded successfully. As reported in the caddy logs, the other files all have write: broken pipe error, and dufs only returns 401 for those files, but not 200 OK or other success status (e.g. 207 in the logs). The error returned to the client is 502, which may be caused by caddy.

<!-- gh-comment-id:3164916671 --> @Cusox commented on GitHub (Aug 7, 2025): > Sorry, I cannot confim the bug.对不起,我无法确认该错误。 > > You need to confirm whether the file has been uploaded correctly. The logs don't show any issues.您需要确认文件是否已正确上传。日志没有显示任何问题。 > > When using HTTP Digest Authentication, there are usually two HTTP requests:使用 HTTP 摘要验证时,通常有两个 HTTP 请求: > > 1. The client sends the first request (without authentication information) → the server responds with 401 Unauthorized.客户端发送第一个请求(不含身份验证信息)→服务器回复 401 未授权。 > 2. The client constructs a request containing the Digest authentication information based on the WWW-Authenticate header in the 401 response → the server responds with 200 OK (or another success status).客户端根据 401 响应中的 WWW-Authenticate 标头构建一个包含摘要验证信息的请求→服务器以 200 OK(或其他成功状态)作为响应。 > > So it's normal to encounter 401.因此,遇到 401 是很正常的。 @sigoden Thanks for your reply! Actually, only the file `user_de.tar.zst` and `data.tar.zst` uploaded successfully. As reported in the caddy logs, the other files all have `write: broken pipe` error, and dufs only returns 401 for those files, but not 200 OK or other success status (e.g. 207 in the logs). The error returned to the client is 502, which may be caused by caddy.
Author
Owner

@sigoden commented on GitHub (Aug 8, 2025):

The dufs log records all requests. If there's no record, it likely means the request was never sent or hasn't completed yet (such as when an upload is still in progress).

Even if a request is suddenly interrupted, dufs will log the error.

ERROR - 192.168.8.8 "PUT /test.bin" 500 error reading a body from connection

You can use this information to analyze whether there is actually an issue between the reverse proxy and dufs.

<!-- gh-comment-id:3166063813 --> @sigoden commented on GitHub (Aug 8, 2025): The dufs log records all requests. If there's no record, it likely means the request was never sent or hasn't completed yet (such as when an upload is still in progress). Even if a request is suddenly interrupted, dufs will log the error. ``` ERROR - 192.168.8.8 "PUT /test.bin" 500 error reading a body from connection ``` You can use this information to analyze whether there is actually an issue between the reverse proxy and dufs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#361