Bug report:
find_matching_rule() does not check HTTP method. When a HEAD/PUT/POST/DELETE request matches a proxy rule, it is routed to download_task which only handles read operations. This causes write failure or silent data loss.
Expected behavior:
Only GET requests should be routed to download_task. Other methods should be proxied directly to the origin server.
How to reproduce it:
- Set a proxy rule that matches the target URL and
HTTPS_PROXY to dfdaemon
- Send a PUT request to a URL that matches the rule
- Observe: PUT is routed to
proxy_via_dfdaemon → download_task → write fails
Environment:
- Client version:
- OS:
- Kernel (e.g.
uname -a):
- Others:
Bug report:
find_matching_rule()does not check HTTP method. When a HEAD/PUT/POST/DELETE request matches a proxy rule, it is routed todownload_taskwhich only handles read operations. This causes write failure or silent data loss.Expected behavior:
Only GET requests should be routed to
download_task. Other methods should be proxied directly to the origin server.How to reproduce it:
HTTPS_PROXYto dfdaemonproxy_via_dfdaemon→download_task→ write failsEnvironment:
uname -a):