aboutsummaryrefslogtreecommitdiffstats
path: root/examples/flowbasic
diff options
context:
space:
mode:
authorRouli <rouli.net@gmail.com>2013-03-18 14:24:13 +0200
committerRouli <rouli.net@gmail.com>2013-03-18 14:24:13 +0200
commitc94aadcb0ee5e7aab8acc46a0e4ac7d02a28df6f (patch)
tree1e62785d669d86f6e551a99b9debfe445389bd48 /examples/flowbasic
parentb6cae7cd2d0105d6a6fe9d35864d0f9b7c5f8924 (diff)
parent5c33f6784b4ba34dd9825ea7e3070cdf0b2b4621 (diff)
downloadmitmproxy-c94aadcb0ee5e7aab8acc46a0e4ac7d02a28df6f.tar.gz
mitmproxy-c94aadcb0ee5e7aab8acc46a0e4ac7d02a28df6f.tar.bz2
mitmproxy-c94aadcb0ee5e7aab8acc46a0e4ac7d02a28df6f.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'examples/flowbasic')
-rwxr-xr-xexamples/flowbasic8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/flowbasic b/examples/flowbasic
index b419f9e7..b8184262 100755
--- a/examples/flowbasic
+++ b/examples/flowbasic
@@ -3,8 +3,8 @@
This example shows how to build a proxy based on mitmproxy's Flow
primitives.
- Note that request and response messages are not automatically acked, so we
- need to implement handlers to do this.
+ Note that request and response messages are not automatically replied to,
+ so we need to implement handlers to do this.
"""
import os
from libmproxy import proxy, flow
@@ -19,13 +19,13 @@ class MyMaster(flow.FlowMaster):
def handle_request(self, r):
f = flow.FlowMaster.handle_request(self, r)
if f:
- r._ack()
+ r.reply()
return f
def handle_response(self, r):
f = flow.FlowMaster.handle_response(self, r)
if f:
- r._ack()
+ r.reply()
print f
return f