emersion / go-webdav

A Go library for WebDAV, CalDAV and CardDAV
MIT License
314 stars 66 forks source link

Feature Request: Support for out-of-spec unquoted getetag values #165

Open EtienneBruines opened 2 months ago

EtienneBruines commented 2 months ago

Some WebDAV servers do not return quoted etag values (to make them re-usable for the ETag HTTP response header), e.g. https://github.com/haiwen/seafdav/issues/82 and https://github.com/photoprism/photoprism/issues/3495 even though they should.

Would it be possible/reasonable to accept unquoted ETag values? To make this library compatible with a wider range of servers?

Potentially like https://github.com/emersion/go-webdav/pull/69 although I was thinking modifying https://github.com/emersion/go-webdav/blob/810c51fa2d38ba62ca3971524f9cc322a6a504f4/internal/elements.go#L382 to not return an error if it's simply an alphanumerical string (a hash or something) that just doesn't have quotes.

What do you think?