falconry/falcon

Proper `HEAD` support for static routes

Open

#2,337 创建于 2024年9月22日

在 GitHub 查看
 (12 评论) (0 反应) (0 负责人)Python (9,293 star) (925 fork)batch import
enhancementgood first issue

描述

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.

贡献者指南