[GH-ISSUE #554] Missing "modified date" causes files to be unavailable #325

Closed
opened 2026-04-08 16:52:02 +03:00 by zhus · 1 comment
Owner

Originally created by @Rogibaer on GitHub (Mar 12, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/554

I downloaded a few files from the internet and could not access them via dufs.
After a little troubleshooting i found that the "modified date" attribute of the files were not set.
Fixed the problem by providing a timestamp via "touch -t".

The files were listed by DUFS.
DUFS Logs showed HTTP 200 when accessing the file, however nothing happened.
A new browser window was opened and led showed 404.

The Logs showed that there was a panic because of the missing date -> date must be before year 9999.

See logs when accessing a file:
2025-03-12T19:34:17Z INFO - 172.20.0.11 "GET https://*:5000/PATH/" 200
thread 'tokio-runtime-worker' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/httpdate-1.0.3/src/date.rs:56:13:
date must be before year 9999
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Listening on:
https://:5000/
https://
:5000/
https://*:5000/

Maybe you can add a warning for files missing a modified date or maybe just set one yourself, if its missing.

Kind regards,

Originally created by @Rogibaer on GitHub (Mar 12, 2025). Original GitHub issue: https://github.com/sigoden/dufs/issues/554 I downloaded a few files from the internet and could not access them via dufs. After a little troubleshooting i found that the "modified date" attribute of the files were not set. Fixed the problem by providing a timestamp via "touch -t". The files were listed by DUFS. DUFS Logs showed HTTP 200 when accessing the file, however nothing happened. A new browser window was opened and led showed 404. The Logs showed that there was a panic because of the missing date -> date must be before year 9999. See logs when accessing a file: 2025-03-12T19:34:17Z INFO - 172.20.0.11 "GET https://*:5000/PATH/" 200 thread 'tokio-runtime-worker' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/httpdate-1.0.3/src/date.rs:56:13: date must be before year 9999 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Listening on: https://*:5000/ https://*:5000/ https://*:5000/ Maybe you can add a warning for files missing a modified date or maybe just set one yourself, if its missing. Kind regards,
zhus closed this issue 2026-04-08 16:52:02 +03:00
Author
Owner

@sigoden commented on GitHub (Mar 14, 2025):

@Rogibaer
How do you create a file without an mtime?
How can I reproduce the bug?

<!-- gh-comment-id:2723070120 --> @sigoden commented on GitHub (Mar 14, 2025): @Rogibaer How do you create a file without an mtime? How can I reproduce the bug?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#325