aboutsummaryrefslogtreecommitdiffstats
path: root/examples/stub.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-12-16 22:10:06 +0100
committerMaximilian Hils <git@maximilianhils.com>2013-12-16 22:10:06 +0100
commite643759ef653908dadffd82a832eb67f5223cd71 (patch)
tree54812017b647bc64e844546bbde12a5b04ff1298 /examples/stub.py
parent6ec2e6f24f2e64854e80d81c04ae44c094486821 (diff)
parentafff1f17340b2a62de168ec42655ed7e5779c3c4 (diff)
downloadmitmproxy-e643759ef653908dadffd82a832eb67f5223cd71.tar.gz
mitmproxy-e643759ef653908dadffd82a832eb67f5223cd71.tar.bz2
mitmproxy-e643759ef653908dadffd82a832eb67f5223cd71.zip
merge smurfix/fix2, add serverconnect hook docs, adjust tests
Diffstat (limited to 'examples/stub.py')
-rw-r--r--examples/stub.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/stub.py b/examples/stub.py
index 42b2935a..78cbfcf2 100644
--- a/examples/stub.py
+++ b/examples/stub.py
@@ -14,6 +14,13 @@ def clientconnect(ctx, client_connect):
"""
ctx.log("clientconnect")
+def serverconnect(ctx, server_connection):
+ """
+ Called when the proxy initiates a connection to the target server. Note that a
+ connection can correspond to multiple HTTP requests
+ """
+ ctx.log("serverconnect")
+
def request(ctx, flow):
"""
Called when a client request has been received.