-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Labels
kind/triageUnclassified issuesUnclassified issues
Description
Problem Description
When copying a cURL command, sometimes it puts a printf call in the -d flag, like this:
-d "$(printf '---other-data')"
But as in the example upper, like this it would show the following error:
bash: printf: --: invalid optionTo fix, it would be needed to modify the part to be -d "$(printf -- '---other-data')", so, put a -- after the printf command.
Steps to reproduce
- Get an appropriate HTTP request in MitmProxy Web UI (I am not sure if this apples to CLI as well)
- Try to copy the request as a cURL command
- Run the copied command
- Expected result: command runs successfully, actual result: shows the
bash: printf: --: invalid option(or, if the argument started with a single dash followed by a letter, that sequence instead of--)
System Information
Mitmproxy: 12.2.1 binary
Python: 3.14.0
OpenSSL: OpenSSL 3.5.4 30 Sep 2025
Platform: Linux-6.18.5-200.fc43.x86_64-x86_64-with-glibc2.42
Checklist
- This bug affects the latest mitmproxy release.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/triageUnclassified issuesUnclassified issues