From b607a2b9af0e5004c45b28e4b6452408f4cb888f Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Mon, 17 Oct 2016 13:57:38 -0700 Subject: [PATCH] Enable 'OPTIONS' method for simple_server. You still need to set the config option to allow the method but if it is enabled then Quixote will allow it. Implementation of the method is up to the application, not Quixote. --- quixote/server/simple_server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quixote/server/simple_server.py b/quixote/server/simple_server.py index 32fc247..547cb70 100755 --- a/quixote/server/simple_server.py +++ b/quixote/server/simple_server.py @@ -109,6 +109,9 @@ class HTTPRequestHandler(BaseHTTPRequestHandler): def do_HEAD(self): return self.process(self.get_cgi_env('HEAD'), include_body=False) + def do_OPTIONS(self): + return self.process(self.get_cgi_env('OPTIONS'), include_body=False) + def send_response(self, code, message=None): """ Copied, with regret, from BaseHTTPRequestHandler, except that the line