aboutsummaryrefslogtreecommitdiffstats
path: root/examples/stub.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stub.py')
-rw-r--r--examples/stub.py16
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.
"""