mitmproxy/test/scripts/stream_modify.py

8 lines
195 B
Python
Raw Normal View History

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