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
|
# > 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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
@ -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")
|
Loading…
Reference in New Issue
Block a user