fix: timestamp format of getlastmodified in dav xml by tobyp · Pull Request #366 · sigoden/dufs (original) (raw)
RFC4918 (WebDAV) requires the getlastmodified property to be a date as returned in a Last-Modified header. It also specifically references the rfc1123-date ABNF definition (though confusingly, as defined in RFC 2616), which always ends in GMT.
Note that HTTP/1.1 clients must accept timestamps as Dufs currently generates them, but servers are not allowed to generate them, and thus by reference, WebDAV servers can't either.
Unfortunately, chrono doesn't have a to_rfc1123 (or to_rfc2616) function, but all the parts are available via format.
I discovered this via error messages produced by the DAVx5 Android App: dav4jvm : [at.bitfire.dav4jvm.HttpUtils] Couldn't parse HTTP date: Wed, 21 Feb 2024 21:03:42 +0000, ignoring