protected function handleInvalidMethod($method)
    {
        $emptyResponse = new Response();
        $emptyResponse->setHeader("HTTP/1.1 405 Method $method Not Allowed", false);
        $emptyResponse->setHeader("Allow", implode(", ", $this->getSupportedHttpMethods()));

        throw new ForceResponseException($emptyResponse);
    }