Understanding 0.18.2 redirect_requests example script

I’m using mitmproxy0.18.2 w/Python3.5.2, with a pretty complex input script. Everything works great, except for an issue generating responses to particular requests. I tore it down to the basic example (https://github.com/mitmproxy/mitmproxy/blob/0.18.x/examples/redirect_requests.py).

Run curl:
curl -x 127.0.0.1:8080 example.com

Run mitmdump:
/opt/my0.18# mitmdump -s redirect_requests.py
127.0.0.1:42475: GET http://example.com/
<< 200 OK 1.24k
127.0.0.1:42475: clientdisconnect

You can see that I get the full 1.24kb of content from example.com, when I expect to get “Hello world.” Am I misunderstanding what’s supposed to happen here?

You can see that I get the full 1.24kb of content from example.com, when I expect to get “Hello world.” Am I misunderstanding what’s supposed to happen here?

No - this looks like wrong behaviour. examples/simple/send_reply_from_proxy.py works fine for me with 1.0.2. Can you upgrade to 1.0 and try again?