diff --git a/src/milla/app.py b/src/milla/app.py index d7117e1..740057f 100644 --- a/src/milla/app.py +++ b/src/milla/app.py @@ -48,7 +48,7 @@ class Application(object): configuration is copied and assigned to ``request.config``. ''' - DEFAULT_ALLOWED_METHODS = ['GET', 'HEAD', 'OPTIONS'] + DEFAULT_ALLOWED_METHODS = ['GET', 'HEAD'] def __init__(self, dispatcher): self.dispatcher = dispatcher @@ -84,8 +84,9 @@ class Application(object): response.headers = allow_header return response func = options_response - return HTTPMethodNotAllowed(headers=allow_header)(environ, - start_response) + else: + func = HTTPMethodNotAllowed(headers=allow_header) + return func(environ, start_response) start_response_wrapper = StartResponseWrapper(start_response) request.start_response = start_response_wrapper