falconry/falcon

Proper `HEAD` support for static routes

Open

#2 337 ouverte le 22 sept. 2024

Voir sur GitHub
 (12 commentaires) (0 réactions) (0 assignés)Python (925 forks)batch import
enhancementgood first issue

Métriques du dépôt

Stars
 (9 293 stars)
Métriques de merge PR
 (Merge moyen 2j 7h) (9 PRs mergées en 30 j)

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.

Guide contributeur