mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
fix #411
This commit is contained in:
parent
31925dc9be
commit
b95f0c9971
@ -1043,7 +1043,7 @@ class HTTPHandler(ProtocolHandler):
|
||||
# call the appropriate script hook - this is an opportunity for an
|
||||
# inline script to set flow.stream = True
|
||||
flow = self.c.channel.ask("responseheaders", flow)
|
||||
if flow == KILL:
|
||||
if flow is None or flow == KILL:
|
||||
raise KillSignal()
|
||||
else:
|
||||
# now get the rest of the request body, if body still needs to be
|
||||
@ -1086,11 +1086,11 @@ class HTTPHandler(ProtocolHandler):
|
||||
# sent through to the Master.
|
||||
flow.request = req
|
||||
request_reply = self.c.channel.ask("request", flow)
|
||||
self.process_server_address(flow) # The inline script may have changed request.host
|
||||
|
||||
if request_reply is None or request_reply == KILL:
|
||||
raise KillSignal()
|
||||
|
||||
self.process_server_address(flow) # The inline script may have changed request.host
|
||||
|
||||
if isinstance(request_reply, HTTPResponse):
|
||||
flow.response = request_reply
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user