PerlDancer/Dancer2 — pull request #595 by omar-m-othman (2014-05-30 10:26:46+00:00)
Title: GH #585: Adding a pre-dispatch sanity check for supported HTTP method:

It should not be possible to cause an internal server error by sending
an invalid HTTP method. Dancer 2 should return a 405 "Method Not Allowed"
instead.

We now inspect the environment hash to know whether it is possible to
build a request from the given parameters. The issue that spawned this
was being passed an unsupported method.

We keep a hash of supported methods in Dancer2::Core::Types available from
everywhere.