-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Current behavior
A HEAD request for a static file, any static file, returns a 404.
Expected behavior
A HEAD request should return exactly the same response headers as a GET for the same resource, but without the content. 404ing a HEAD request is extremely unusual for web servers, going back to the beginning of the web.
Consequences
When working locally in development, this difference is rarely noticed - other than every once in a while a bit of jankiness where it seems a page needs to be reloaded unnecessarily. In production deployment, web caches will sometimes try a HEAD first, and therefore create a very difficult to track down bug in which static resources appear to sometimes be missing.
It probably would be best to fix this issue in Elysia itself, but in the meantime, a fix for static file serving would be good.