[PR #366] [MERGED] fix: timestamp format of getlastmodified in dav xml #585

Closed
opened 2026-04-08 16:53:33 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/366
Author: @tobyp
Created: 2/22/2024
Status: Merged
Merged: 2/22/2024
Merged by: @sigoden

Base: mainHead: fix-getlastmodified-timestamp-format


📝 Commits (1)

  • 1dc0c21 Fix timestamp format in "getlastmodified" timestamp property

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/server.rs (+1 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigoden/dufs/pull/366 **Author:** [@tobyp](https://github.com/tobyp) **Created:** 2/22/2024 **Status:** ✅ Merged **Merged:** 2/22/2024 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `fix-getlastmodified-timestamp-format` --- ### 📝 Commits (1) - [`1dc0c21`](https://github.com/sigoden/dufs/commit/1dc0c21d7468cd5ee4d8426d71a09812df7d8986) Fix timestamp format in "getlastmodified" timestamp property ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/server.rs` (+1 -1) </details> ### 📄 Description [RFC4918 (WebDAV)](https://datatracker.ietf.org/doc/html/rfc4918#section-15.7) 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](https://datatracker.ietf.org/doc/html/rfc2616#section-3.3.1)), 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` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-04-08 16:53:33 +03:00
zhus closed this issue 2026-04-08 16:53:33 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#585