falconry/falcon

Proper `HEAD` support for static routes

Open

#2.337 aberto em 22 de set. de 2024

Ver no GitHub
 (12 comments) (0 reactions) (0 assignees)Python (925 forks)batch import
enhancementgood first issue

Métricas do repositório

Stars
 (9.293 stars)
Métricas de merge de PR
 (Mesclagem média 2d 7h) (9 fundiu PRs em 30d)

Description

Implement proper HEAD support for static file serving.

The response should follow the same logic as the default GET behaviour (like now), but not open any file streams (because we do not need any as the response to a HEAD request cannot have any body anyway).

As a bonus, I think we need to block unsupported methods such as POST and PUT, and render the correct Allow header in response to OPTIONS.

Guia do colaborador