Skip to content

Fix printf option parsing in cURL export for dash-prefixed data#8078

Open
veeceey wants to merge 3 commits intomitmproxy:mainfrom
veeceey:fix/issue-8050
Open

Fix printf option parsing in cURL export for dash-prefixed data#8078
veeceey wants to merge 3 commits intomitmproxy:mainfrom
veeceey:fix/issue-8050

Conversation

@veeceey
Copy link
Copy Markdown

@veeceey veeceey commented Feb 8, 2026

No description provided.

veeceey and others added 2 commits February 8, 2026 15:01
…dash

When exporting a request as a cURL command, if the POST body contained
control characters and started with dashes (e.g. multipart boundaries
like "---boundary"), the generated printf call would fail with
"invalid option" because printf interpreted the leading dashes as flags.

Adding `--` after `printf` signals end-of-options, preventing this error.

Fixes mitmproxy#8050

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@veeceey
Copy link
Copy Markdown
Author

veeceey commented Feb 19, 2026

Friendly ping - any chance someone could take a look at this when they get a chance? Happy to make any changes if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant