websrv_lib: workaround the send-error of bad handlers
If a handler doesn't inherit FixSendError, it will leave the connection hanging on a 501 response. Don't trust the handlers. bzr revid: p_christ@hol.gr-20100726093335-xa0p85vxje63w03k
This commit is contained in:
@@ -229,7 +229,7 @@ class MultiHTTPHandler(FixSendError,BaseHTTPRequestHandler):
|
||||
return
|
||||
mname = 'do_' + fore.command
|
||||
if not hasattr(fore, mname):
|
||||
fore.send_error(501, "Unsupported method (%r)" % fore.command)
|
||||
self.send_error(501, "Unsupported method (%r)" % fore.command)
|
||||
return
|
||||
fore.close_connection = 0
|
||||
method = getattr(fore, mname)
|
||||
|
||||
Reference in New Issue
Block a user