summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
diff options
context:
space:
mode:
authorIan Bicking <ian@ianbicking.org>2007-01-30 20:52:33 +0000
committerIan Bicking <ian@ianbicking.org>2007-01-30 20:52:33 +0000
commit50afc7ac500f1ae4d6746fceee12ccba67c4749d (patch)
treeeb8a2896abbfb3d15e1912c2a32aca45704a09bd /paste/httpserver.py
parent9f62055cfdc88170b8b19295b97169c6f7026084 (diff)
downloadpaste-git-50afc7ac500f1ae4d6746fceee12ccba67c4749d.tar.gz
make paste.httpserver support all request methods
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-xpaste/httpserver.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/paste/httpserver.py b/paste/httpserver.py
index 7969879..c0a5c28 100755
--- a/paste/httpserver.py
+++ b/paste/httpserver.py
@@ -357,8 +357,22 @@ class WSGIHandler(WSGIHandlerMixin, BaseHTTPRequestHandler):
requests to the server's ``wsgi_application``.
"""
server_version = 'PasteWSGIServer/' + __version__
- do_POST = do_GET = do_HEAD = do_DELETE = do_PUT = do_TRACE = \
- WSGIHandlerMixin.wsgi_execute
+
+ def handle_one_request(self):
+ """Handle a single HTTP request.
+
+ You normally don't need to override this method; see the class
+ __doc__ string for information on how to handle specific HTTP
+ commands such as GET and POST.
+
+ """
+ self.raw_requestline = self.rfile.readline()
+ if not self.raw_requestline:
+ self.close_connection = 1
+ return
+ if not self.parse_request(): # An error code has been sent, just exit
+ return
+ self.wsgi_execute()
def handle(self):
# don't bother logging disconnects while handling a request