Stream large bodies warn with modify body (#6514)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
This commit is contained in:
rosydawn6 2023-12-04 21:36:54 -05:00 committed by GitHub
parent ba84b6be99
commit 81fc802194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 5 deletions

View file

@ -205,7 +205,9 @@ if a modify hook is triggered on server response, the replacement is
only run on the Response object leaving the Request intact. You control
whether the hook triggers on the request, response or both using the
filter pattern. If you need finer-grained control than this, it's simple
to create a script using the replacement API on Flow components.
to create a script using the replacement API on Flow components. Body
modifications have no effect on streamed bodies. See
[Streaming]({{< relref "#streaming" >}}) for more detail.
#### Examples
@ -359,8 +361,8 @@ indicated manipulations on it, and then send the message on to the other party.
This can be problematic when downloading or uploading large files. When
streaming is enabled, message bodies are not buffered on the proxy but instead
sent directly to the server/client. This currently means that the message body
will not be accessible within mitmproxy. HTTP headers are still fully buffered before
being sent.
will not be accessible within mitmproxy, and body modifications will have no
effect. HTTP headers are still fully buffered before being sent.
Request/response streaming is enabled by specifying a size cutoff in the
`stream_large_bodies` option.