aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2016-11-14 08:03:10 +1300
committerGitHub <noreply@github.com>2016-11-14 08:03:10 +1300
commitb636e4353a4804f92c8a3d56250874f7b081b691 (patch)
treecd96f4d7e6f7e7c7373f60513e51d83785ce418b /docs
parentafa124a9f65364031080b81b04400be4bd05e418 (diff)
parent9b08279c7c3384f716b66329fefbe97a368189a2 (diff)
downloadmitmproxy-b636e4353a4804f92c8a3d56250874f7b081b691.tar.gz
mitmproxy-b636e4353a4804f92c8a3d56250874f7b081b691.tar.bz2
mitmproxy-b636e4353a4804f92c8a3d56250874f7b081b691.zip
Merge pull request #1720 from cortesi/proxyrefactor
proxy.protocol.http-related refactoring
Diffstat (limited to 'docs')
-rw-r--r--docs/scripting/events.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/scripting/events.rst b/docs/scripting/events.rst
index 62266485..5f560e58 100644
--- a/docs/scripting/events.rst
+++ b/docs/scripting/events.rst
@@ -98,6 +98,18 @@ HTTP Events
:widths: 40 60
:header-rows: 0
+ * - .. py:function:: http_connect(flow)
+ - Called when we receive an HTTP CONNECT request. Setting a non 2xx
+ response on the flow will return the response to the client abort the
+ connection. CONNECT requests and responses do not generate the usual
+ HTTP handler events. CONNECT requests are only valid in regular and
+ upstream proxy modes.
+
+ *flow*
+ A ``models.HTTPFlow`` object. The flow is guaranteed to have
+ non-None ``request`` and ``requestheaders`` attributes.
+
+
* - .. py:function:: request(flow)
- Called when a client request has been received.