falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

Support `Last-Modified` header for static files #2244

Open vytas7 opened 2 months ago

vytas7 commented 2 months ago

Render the Last-Modified header when serving static files. We are already performing .stat() on the open file handle, so we should have the required modification date.

When serving, also check the If-Modified-Since header, and render HTTP 304 Not Modified if appropriate.

This issue is very similar to #2243, but probably slightly easier, so maybe this one could be taken first.

TimoHorstmann commented 2 months ago

Trying to sprint on it

vytas7 commented 1 month ago

@TimoHorstmann just checking, do you have any files left from the Sprint that might be of use?