From a18db90ea3123b37e3f1fd3f10da001a8ea893c2 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 4 Sep 2015 00:46:42 +0200 Subject: update example inline scripts --- examples/stub.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/stub.py') 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. """ -- cgit v1.2.3