mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
minor fixes
This commit is contained in:
parent
1f47f7b6b2
commit
1a41c15c03
@ -940,7 +940,7 @@ class HTTPHandler(ProtocolHandler):
|
||||
# > send large request upstream
|
||||
self.c.server_reconnect()
|
||||
else:
|
||||
raise v
|
||||
raise
|
||||
|
||||
def handle_flow(self):
|
||||
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:
|
||||
self.c.channel.ask("error", flow.error)
|
||||
else:
|
||||
pass # FIXME: Do we want to persist errors without flows?
|
||||
pass
|
||||
|
||||
try:
|
||||
self.send_error(code, message, headers)
|
||||
|
@ -3,7 +3,7 @@ from __future__ import absolute_import
|
||||
|
||||
class ProxyError(Exception):
|
||||
def __init__(self, code, message, headers=None):
|
||||
super(ProxyError, self).__init__(self, message)
|
||||
super(ProxyError, self).__init__(message)
|
||||
self.code, self.headers = code, headers
|
||||
|
||||
|
||||
|
@ -279,5 +279,4 @@ class ConnectionHandler:
|
||||
# make dang sure it doesn't happen.
|
||||
except Exception: # pragma: no cover
|
||||
import traceback
|
||||
|
||||
self.log("Error in handle_sni:\r\n" + traceback.format_exc(), "error")
|
Loading…
Reference in New Issue
Block a user