ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.48k stars 891 forks source link

Unsupported method should return HTTP 405 error not 404 #238

Open jamiebullock opened 7 years ago

jamiebullock commented 7 years ago

If crow receives a request with an unsupported method (e.g. an endpoint supports POST but not PUT), it returns 404 Not Found, but should return 405 Method Not Allowed with an "Allow" header specifying the methods that are allowed

The-EDev commented 4 years ago

this issue is in routing.h, specifically the handle() function, the code seems to execute whether the method or url is not found.