Fix printf option parsing in cURL export for dash-prefixed data by veeceey · Pull Request #8078 · mitmproxy/mitmproxy

@veeceey @claude

…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>