Skip to content

How to capture downloaded content? The download GET response content is None #6807

Closed Answered by changsin
changsin asked this question in Q&A
Discussion options

You must be logged in to vote

I found out the answer to my question so posting here for posterity.
It turned out that we were setting the response stream value to True.
Refer to https://docs.mitmproxy.org/stable/overview-features/#streaming for details

    def responseheaders(self, flow: http.HTTPFlow) -> None:
        """
        Enables streaming for all responses.
        This is equivalent to passing `--set stream_large_bodies=1` to mitmproxy.
        """
        flow.response.stream = True

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by changsin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant