websrv_lib: fix handling of method exceptions.

They should not consume the body (twice), pass the error to the log(..),
since it may contain '%' characters.

bzr revid: p_christ@hol.gr-20100726093335-wgh34fxda2nt64ze
This commit is contained in:
P. Christeas 2010-07-26 12:33:35 +03:00
parent 7d24059c09
commit d0eb1d7516
1 changed files with 1 additions and 2 deletions

View File

@ -253,8 +253,7 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
except (AuthRejectedExc, AuthRequiredExc):
raise
except Exception, e:
self.log_error("Could not run %s: %s" % (mname, e))
self._get_ignore_body(fore)
self.log_error("Could not run %s: %s", mname, e)
self.send_error(500, "Internal error")
# may not work if method has already sent data
fore.close_connection = 1