You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# coding: utf-8importsysfromgor.middlewareimportAsyncioGordefon_request(proxy, msg, **kwargs):
proxy.on('response', on_response, idx=msg.id, req=msg)
defon_response(proxy, msg, **kwargs):
proxy.on('replay', on_replay, idx=kwargs['req'].id, req=kwargs['req'], resp=msg)
defon_replay(proxy, msg, **kwargs):
replay_status=proxy.http_status(msg.http)
resp_status=proxy.http_status(kwargs['resp'].http)
ifreplay_status!=resp_status:
sys.stderr.write('replay status [%s] diffs from response status [%s]\n'% (replay_status, resp_status))
else:
sys.stderr.write('replay status is same as response status\n')
sys.stderr.flush()
if__name__=='__main__':
proxy=AsyncioGor()
proxy.on('request', on_request)
proxy.run()
replay_resp appears earlier than origin_resp, and on_replay depends on on_response. on_replay method is not registered at the time of replay_resp's appearance
The text was updated successfully, but these errors were encountered:
# coding: utf-8importsysfromgor.middlewareimportAsyncioGordefon_request(proxy, msg, **kwargs):
proxy.on('response', on_response, idx=msg.id, req=msg)
defon_response(proxy, msg, **kwargs):
proxy.on('replay', on_replay, idx=kwargs['req'].id, req=kwargs['req'], resp=msg)
defon_replay(proxy, msg, **kwargs):
replay_status=proxy.http_status(msg.http)
resp_status=proxy.http_status(kwargs['resp'].http)
ifreplay_status!=resp_status:
sys.stderr.write('replay status [%s] diffs from response status [%s]\n'% (replay_status, resp_status))
else:
sys.stderr.write('replay status is same as response status\n')
sys.stderr.flush()
if__name__=='__main__':
proxy=AsyncioGor()
proxy.on('request', on_request)
proxy.run()
replay_resp appears earlier than origin_resp, and on_replay depends on on_response. on_replay method is not registered at the time of replay_resp's appearance
replay_resp appears earlier than origin_resp, and on_replay depends on on_response. on_replay method is not registered at the time of replay_resp's appearance
The text was updated successfully, but these errors were encountered: