mitmproxy/test/scripts/stream_modify.py

8 lines
159 B
Python
Raw Normal View History

2015-02-27 14:24:27 +00:00
def modify(chunks):
2015-08-29 12:28:11 +00:00
for chunk in chunks:
yield chunk.replace("foo", "bar")
2015-02-27 14:24:27 +00:00
def responseheaders(context, flow):
2015-05-30 00:03:28 +00:00
flow.response.stream = modify