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:
P. Christeas
2010-07-26 12:33:35 +03:00
parent 754c834d42
commit 60d11da63e
+1 -1
View File
@@ -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)