minor fixes

This commit is contained in:
Maximilian Hils 2014-08-31 16:52:26 +02:00
parent 1f47f7b6b2
commit 1a41c15c03
3 changed files with 3 additions and 4 deletions

View File

@ -940,7 +940,7 @@ class HTTPHandler(ProtocolHandler):
# > send large request upstream # > send large request upstream
self.c.server_reconnect() self.c.server_reconnect()
else: else:
raise v raise
def handle_flow(self): def handle_flow(self):
flow = HTTPFlow(self.c.client_conn, self.c.server_conn, self.live) flow = HTTPFlow(self.c.client_conn, self.c.server_conn, self.live)
@ -1078,7 +1078,7 @@ class HTTPHandler(ProtocolHandler):
if flow.request and not flow.response: if flow.request and not flow.response:
self.c.channel.ask("error", flow.error) self.c.channel.ask("error", flow.error)
else: else:
pass # FIXME: Do we want to persist errors without flows? pass
try: try:
self.send_error(code, message, headers) self.send_error(code, message, headers)

View File

@ -3,7 +3,7 @@ from __future__ import absolute_import
class ProxyError(Exception): class ProxyError(Exception):
def __init__(self, code, message, headers=None): def __init__(self, code, message, headers=None):
super(ProxyError, self).__init__(self, message) super(ProxyError, self).__init__(message)
self.code, self.headers = code, headers self.code, self.headers = code, headers

View File

@ -279,5 +279,4 @@ class ConnectionHandler:
# make dang sure it doesn't happen. # make dang sure it doesn't happen.
except Exception: # pragma: no cover except Exception: # pragma: no cover
import traceback import traceback
self.log("Error in handle_sni:\r\n" + traceback.format_exc(), "error") self.log("Error in handle_sni:\r\n" + traceback.format_exc(), "error")