lukeed / trouter

:fish: A fast, small-but-mighty, familiar fish...errr, router*
MIT License
641 stars 23 forks source link

Do not treat HTTP HEAD as equivalent to GET #23

Closed houyonglu closed 4 months ago

houyonglu commented 4 months ago

Hello, Luke. First of all, thank you for creating this library; it has helped me a lot.

In my use case, I am unable to match routes declared as HEAD because trouter treats HTTP HEAD as completely equivalent to GET. Although they are generally similar, there are fundamental differences between the two.

As a foundational library, I believe its behavior should adhere to general standards, while "specific" functionalities should be implemented by higher-level frameworks. I have created a PR to "fix this issue" and hope you can consider it or discuss it further.

houyonglu commented 4 months ago

Author's comments: https://github.com/lukeed/trouter/pull/22#issuecomment-2143963366