Open vuori opened 1 day ago
I think we should drop headResponseCache
completly: for every random-access file request, there should be a HEAD
at the beginning that fetches the ETag and then for all operations this ETag is expected (otherwise an I/O error shall be returned).
Problem scope
App version
Android version and device/firmware type
Android 15 (GrapheneOS, Pixel 8a, F-Droid)
Steps to reproduce
mod_dav
.If-Match
ETag on theGET
that DAVx5 sends is no longer current.PROPFIND
on the directory and receving an updated ETag in the 412 response).HEAD
. Reading the file now works.Actual result
ETags seem to be cached from a prior
HEAD
request and not refreshed even when the WebDAV server returns status 412 fromIf-Match
request.Expected result
When the file changes on WebDAV server and the server returns 412 on
GET
, DAVx5 should refresh its ETag cache.Further info
Since the server returns the current ETag with the 412 response to the
GET
, maybe pick that up? Alternatively since DAVx5 is doing aPROPFIND
on the directory anyway, perhaps using thelp1:getetag
property would be an option too?If neither sounds good, re-doing
HEAD
on the target on 412 response seems like a surefire solution.