[PR #407] [MERGED] feat: implements remaining http cache conditionals #600

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

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/407
Author: @TinyTinni
Created: 6/22/2024
Status: Merged
Merged: 6/23/2024
Merged by: @sigoden

Base: mainHead: caching-conditions


📝 Commits (2)

  • 2da12d0 implements remaining http conditionals
  • 032594d computed etag is not optional

📊 Changes

2 files changed (+104 additions, -13 deletions)

View changed files

📝 src/server.rs (+24 -13)
tests/cache.rs (+80 -0)

📄 Description

Hi,

this PR fixes/implements some of the HTTP conditionals like "if-modified":

  • if-modified-since: was implemented
  • if-unmodified-since: was not implemented
  • if-none-match + etag: was implemented
  • if-match + etag: was not implemented

This PR implements/fixes those conditionals and also adds some testcases for all 4.

I hope you like it.

For reference, MDN Documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since

edit: clarified "if-modified-since". I misread the code.


🔄 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/407 **Author:** [@TinyTinni](https://github.com/TinyTinni) **Created:** 6/22/2024 **Status:** ✅ Merged **Merged:** 6/23/2024 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `caching-conditions` --- ### 📝 Commits (2) - [`2da12d0`](https://github.com/sigoden/dufs/commit/2da12d0083ebcb1aa6d6d659a41fd84f56fb4e7f) implements remaining http conditionals - [`032594d`](https://github.com/sigoden/dufs/commit/032594dd3b3421c619dc2daab9cf08e391888454) computed etag is not optional ### 📊 Changes **2 files changed** (+104 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/server.rs` (+24 -13) ➕ `tests/cache.rs` (+80 -0) </details> ### 📄 Description Hi, this PR fixes/implements some of the HTTP conditionals like "if-modified": - if-modified-since: was implemented - if-unmodified-since: was not implemented - if-none-match + etag: was implemented - if-match + etag: was not implemented This PR implements/fixes those conditionals and also adds some testcases for all 4. I hope you like it. For reference, MDN Documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since edit: clarified "if-modified-since". I misread the code. --- <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:37 +03:00
zhus closed this issue 2026-04-08 16:53:37 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#600