Unable to modify any traffic

Inline scripts dont seem to alter response or requests.

[details=Summary]import sys

state = {}

state[“old”], state[“new”] = “mitm”, “NOT WORKING”

def response(ctx, flow):
flow.response.content = flow.response.content.replace(state[“old”],state[“new”])[/details]

This is very simple code thats slightly modified from the mitmproxy website, except it doesnt do anything.
Is there something I’m missing about altering flows?



This particular feature works just fine for me, both on 0.17.1 and master. Sorry, but it’s hard to say what’s going wrong here without further information.