From 31ee4607c892f85c5d139e54acbc3ca4f9fb6bcb Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 7 Sep 2015 10:30:40 +0200 Subject: remove old docs --- doc-src/features/responsestreaming.html | 58 --------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 doc-src/features/responsestreaming.html (limited to 'doc-src/features/responsestreaming.html') diff --git a/doc-src/features/responsestreaming.html b/doc-src/features/responsestreaming.html deleted file mode 100644 index 6511e913..00000000 --- a/doc-src/features/responsestreaming.html +++ /dev/null @@ -1,58 +0,0 @@ -By using mitmproxy's streaming feature, response contents can be passed to the client incrementally before they have been fully received by the proxy. -This is especially useful for large binary files such as videos, where buffering the whole file slows down the client's browser. - -By default, mitmproxy will read the entire response, perform any indicated -manipulations on it and then send the (possibly modified) response to -the client. In some cases this is undesirable and you may wish to "stream" -the reponse back to the client. When streaming is enabled, the response is -not buffered on the proxy but directly sent back to the client instead. - -

On the command-line

- -Streaming can be enabled on the command line for all response bodies exceeding a certain size. The SIZE argument understands -k/m/g suffixes, e.g. 3m for 3 megabytes. - - - - - - - - -
command-line - --stream SIZE -
- - -

Caveats

- -When response streaming is enabled, streamed response contents will not be - recorded or preserved in any way. - -When response streaming is enabled, the response body cannot be modified. - -

Customizing Response Streaming

- -You can also use an inline script to customize exactly -which responses are streamed. - -Responses that should be tagged for streaming by setting their respective .stream attribute to True: - -$!example("examples/stream.py")!$ - -

Implementation Details

- -When response streaming is enabled, portions of the code which would have otherwise performed changes -on the response body will see an empty response body instead (libmproxy.protocol.http.CONTENT_MISSING). Any modifications will be ignored. - -Streamed responses are usually sent in chunks of 4096 bytes. If the response is sent with a Transfer-Encoding: - chunked header, the response will be streamed one chunk at a time. - -

Modifying streamed data

-If the .stream attribute is callable, .stream will work as a hook in chunk data processing. - -$!example("examples/stream_modify.py")!$ - -### See Also - -- [Ignore Domains](@!urlTo("passthrough.html")!@) -- cgit v1.2.3