curl / Mailing Lists / curl-library / Single Mail


Re: Decoding base64 in parameter parsing

From: Philipp Hagemeister <>
Date: Mon, 3 Sep 2018 11:35:25 +0200

Thanks for your detailed reply!

My best course of action is then to split off the base64 decoding into
its own C file, and then expose that via curlx, right? I'll try that and
update the PR.

On 9/3/18 8:02 AM, Daniel Stenberg wrote:
> In the PR you mention a concern that 'base64' is not available on
> Windows - so how do you expect most windows users to use a command line
> option that takes base64 encoded data?

My immediate use case is that my (platform-indendent) program outputs
the command-line that can be pasted anywhere.
Note that this is no different from what the Chrome Developer tools do.
At the moment, if the body contains null bytes, the Chrome Developer
tools emit a curl command-line that doesn't work in bash, nor any other
common shell I'm aware of, so Chrome/Chromium likely would also use this
option if it were available.

Individual Windows users can use various programs to generate base64,
chief among them the REPLs or CLI interfaces of Python, Perl and the
like. Maybe they even install a base64 binary. There are also various
web-based solutions, such as .

Again, thank you very much for your help!

- Philipp


Received on 2018-09-03