Return 405 Method Not Allowed instead of 400 Bad Request when request method is not GET or HEAD.