go test
--- FAIL: TestETagUnmarshalText (0.00s)
elements_test.go:79: UnmarshalText failed for ETag: webdav: failed to unquote ETag: invalid syntax
FAIL
exit status 1
FAIL github.com/emersion/go-webdav/internal 0.006s
This patch will check the etag first, before calling the strconv.Unquote function. A string without quotes will not be unquoted.
I encountered the same issue with non-standard (unquoted) etags from my caldav server as my predecessors:
This patch will check the etag first, before calling the
strconv.Unquote
function. A string without quotes will not be unquoted.