Skip to content

Client error in server replay mode with large flow #7569

@christoph-blessing

Description

@christoph-blessing

Problem Description

Curl throws an error when running mitmdump in server replay mode and downloading a large file. The error is: curl: (56) Recv failure: Connection reset by peer This also happens with wget and downloading smaller files from the same server works fine.

Steps to reproduce the behavior:

  1. Run mitmdump saving intercepted flows to file:
    mitmdump --save-stream-file=Isabelle2024_linux.tar.gz.mitm

  2. Download large file:
    curl --proxy http://127.0.0.1:8080 --location https://isabelle.in.tum.de/dist/Isabelle2024_linux.tar.gz > Isabelle2024_linux.tar.gz

  3. Restart mitmdump it in server replay mode:
    mitmdump --server-replay Isabelle2024_linux.tar.gz.mitm

  4. Try download again:
    curl --proxy http://127.0.0.1:8080 --location https://isabelle.in.tum.de/dist/Isabelle2024_linux.tar.gz > Isabelle2024_linux.tar.gz

System Information

Mitmproxy: 12.0.0.dev (+2, commit 35bcadd)
Python:    3.12.8
OpenSSL:   OpenSSL 3.4.1 11 Feb 2025
Platform:  Linux-6.13.2-x86_64-with-glibc2.40

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions