falconry/falcon

Proper `HEAD` support for static routes

Open

#2337 aperta il 22 set 2024

Vedi su GitHub
 (12 commenti) (0 reazioni) (0 assegnatari)Python (925 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (9293 star)
Metriche merge PR
 (Merge medio 2g 7h) (9 PR mergiate in 30 g)

Descrizione

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.

Guida contributor