Commit dd7ed29e authored by Vincent Pelletier's avatar Vincent Pelletier

http_wsgirequesthandler: Reindent to silence pylint warnings.

parent 362a3f7a
...@@ -54,29 +54,29 @@ from wsgiref.simple_server import WSGIRequestHandler as WSGIRequestHandler_org ...@@ -54,29 +54,29 @@ from wsgiref.simple_server import WSGIRequestHandler as WSGIRequestHandler_org
from .http_wsgibase import CleanServerHandler from .http_wsgibase import CleanServerHandler
class WSGIRequestHandler(WSGIRequestHandler_org): class WSGIRequestHandler(WSGIRequestHandler_org):
"""
wsgiref.simple_server.WSGIRequestHandler customised to use
.http_wsgibase.CleanServerHandler .
"""
def handle(self):
""" """
wsgiref.simple_server.WSGIRequestHandler customised to use Handle a single HTTP request
.http_wsgibase.CleanServerHandler .
"""
def handle(self):
"""
Handle a single HTTP request
Copied from python's WSGIRequestHandler class to override ServerHandler Copied from python's WSGIRequestHandler class to override ServerHandler
usage (see CleanServerHandler class). usage (see CleanServerHandler class).
""" """
# As a result, this piece of code is under the Python Software License v2 # As a result, this piece of code is under the Python Software License v2
self.raw_requestline = self.rfile.readline(65537) self.raw_requestline = self.rfile.readline(65537)
if len(self.raw_requestline) > 65536: if len(self.raw_requestline) > 65536:
self.requestline = '' self.requestline = ''
self.request_version = '' self.request_version = ''
self.command = '' self.command = ''
self.send_error(414) self.send_error(414)
return return
if not self.parse_request(): # An error code has been sent, just exit if not self.parse_request(): # An error code has been sent, just exit
return return
handler = CleanServerHandler( handler = CleanServerHandler(
self.rfile, self.wfile, self.get_stderr(), self.get_environ() self.rfile, self.wfile, self.get_stderr(), self.get_environ()
) )
handler.request_handler = self # backpointer for logging handler.request_handler = self # backpointer for logging
handler.run(self.server.get_app()) handler.run(self.server.get_app())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment