starlette icon indicating copy to clipboard operation
starlette copied to clipboard

comply with http caching validation with etag and if-modified-since

Open Smixi-syn opened this issue 10 months ago • 0 comments

Summary

Change the caching validation precedence to comply with HTTP RFC: https://datatracker.ietf.org/doc/html/rfc7232#section-6

The issue was that it must not check the "If-Modified-Since" header when the "If-None-Match" is set. It prioritize file content for caching instead of time based caching (I encountered this when timestamp on file are incorrect for example).

Checklist

  • [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.

Smixi-syn avatar Feb 27 '25 16:02 Smixi-syn