aboutsummaryrefslogtreecommitdiffstats
path: root/test/scripts/stream_modify.py
blob: 9a98a7eedbd91a489806fc993f608bdf4b876d85 (plain)
1
2
3
4
5
6
7
def modify(chunks):
    for prefix, content, suffix in chunks:
        yield prefix, content.replace("foo", "bar"), suffix


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