diff --git a/doc-src/features/responsestreaming.html b/doc-src/features/responsestreaming.html index 176fa4aec..d20af65c3 100644 --- a/doc-src/features/responsestreaming.html +++ b/doc-src/features/responsestreaming.html @@ -1,52 +1,50 @@ +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 back 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 but is instead sent directly back to the client. (If HTTP -chunked transfer encoding is enabled, the response will be streamed -back one chunk at a time.) This is especially useful for large binary files, -which are often not what you are trying to inspect, and while buffering -cause browser slows. +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. -Streaming can be enabled on the command line for all responses which are -greater than a certain size. Note that the SIZE argument below can accept -the usual prefixes (m, k, etc.) +
command-line | -
-
|
-
---|---|
command-line | ++ --stream SIZE + | +
libmproxy.protocol.http.CONTENT_MISSING
). Any modifications will be ignored.
-Portions of the code which would have otherwise performed changes
-on the response body will instead see an empty response body
-and any attempts to modify it 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.
\ No newline at end of file