Open vytas7 opened 4 months ago
Hi! I'd be interested in helping with this enhancement. Any tips on where I should look in the project? I did some basic searching yesterday, but wasn't able to find a file/module this feature could be integrated into.
Hi @dominik-air! And thanks for your interest in contributing to the project!
Serving static files is implemented in falcon/routing/static.py
.
Render the
ETag
header when serving static files. We are already performing.stat()
on the open file handle, so we should have the required data in order to build an ETag. We could use the same algorithm as the popular Nginx web server.When serving, also check the If-None-Match header, and render
HTTP 304 Not Modified
if appropriate.