aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/data/addonscripts/stream_modify.py
blob: bc6163421b8bd00bbdc76245be41c5a7b75154f4 (plain)
1
2
3
4
5
6
7
8
def modify(chunks):
    for chunk in chunks:
        yield chunk.replace(b"foo", b"bar")


def responseheaders(flow):
    flow.response.stream = modify