diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-04 00:47:04 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-04 00:47:04 +0200 |
commit | e88c7e4c58a862d6a222d1f8d4638102228b929e (patch) | |
tree | a801f9bc87ff8f6a7e0cedc37ab57c2edc69cb4a /examples/stub.py | |
parent | 2d1c382f38d3b1cf9219ddb9b62ef196a4381976 (diff) | |
parent | ee8e5947df4af80d85d255d087f94a5f98722ef0 (diff) | |
download | mitmproxy-e88c7e4c58a862d6a222d1f8d4638102228b929e.tar.gz mitmproxy-e88c7e4c58a862d6a222d1f8d4638102228b929e.tar.bz2 mitmproxy-e88c7e4c58a862d6a222d1f8d4638102228b929e.zip |
Merge branch 'master' into readthedocs
Diffstat (limited to 'examples/stub.py')
-rw-r--r-- | examples/stub.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/stub.py b/examples/stub.py index bd3e7cd0..516b71a5 100644 --- a/examples/stub.py +++ b/examples/stub.py @@ -18,19 +18,19 @@ def clientconnect(context, root_layer): context.log("clientconnect") -def serverconnect(context, server_connection): +def request(context, flow): """ - Called when the proxy initiates a connection to the target server. Note that a - connection can correspond to multiple HTTP requests + Called when a client request has been received. """ - context.log("serverconnect") + context.log("request") -def request(context, flow): +def serverconnect(context, server_conn): """ - Called when a client request has been received. + Called when the proxy initiates a connection to the target server. Note that a + connection can correspond to multiple HTTP requests """ - context.log("request") + context.log("serverconnect") def responseheaders(context, flow): @@ -58,7 +58,7 @@ def error(context, flow): context.log("error") -def serverdisconnect(context, server_connection): +def serverdisconnect(context, server_conn): """ Called when the proxy closes the connection to the target server. """ |