[DEL]handle_one_request useless

bzr revid: dle@openerp.com-20121213141452-ts3a0xdcgo63pscg
This commit is contained in:
dle@openerp.com 2012-12-13 15:14:52 +01:00
parent 8efb6d3ea3
commit 3cce9d3569
1 changed files with 2 additions and 32 deletions

View File

@ -77,7 +77,7 @@ def OpenDAVConfig(**kw):
return Config()
class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
class DAVHandler(DAVRequestHandler, HttpOptions, FixSendError):
verbose = False
protocol_version = 'HTTP/1.1'
@ -93,37 +93,6 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
def _log(self, message):
self._logger.debug(message)
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(65537)
if len(self.raw_requestline) > 65536:
self.requestline = ''
self.request_version = ''
self.command = ''
self.send_error(414)
return
if not self.raw_requestline:
self.close_connection = 1
return
if not self.parse_request():
# An error code has been sent, just exit
return
mname = 'do_' + self.command
if not hasattr(self, mname):
self.send_error(501, "Unsupported method (%r)" % self.command)
return
method = getattr(self, mname)
method()
self.wfile.flush() #actually send the response if not already done.
return
def handle(self):
"""Handle multiple requests if necessary."""
self.close_connection = 1
@ -149,6 +118,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
return res
def setup(self):
DAVRequestHandler.setup(self)
self.davpath = '/'+config.get_misc('webdav','vdir','webdav')
addr, port = self.server.server_name, self.server.server_port
server_proto = getattr(self.server,'proto', 'http').lower()