Skip to content

HEAD request 404s for all static files #46

@kylecordes

Description

@kylecordes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions