Updated the RoutingHandler to return the correct status code (405) when determining that the request method is not valid.