curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Suggestion: -H from a file...

From: Kamil Dudka via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 15 May 2017 16:20:44 +0200

On Monday, May 15, 2017 13:55:29 Nick Chambers wrote:
> On 5/15/17, 8:03 AM, "curl-users on behalf of Daniel Stenberg"
>
> <curl-users-bounces_at_cool.haxx.se on behalf of daniel_at_haxx.se> wrote:
> >On Mon, 15 May 2017, Timothe Litt wrote:
> >> Suggestion: add a way to specify -H from a file, perhaps -H @filespec
> >>
> >>as is
> >>
> >> provided for -d & friends?
> >
> >I like this idea!
>
> In the meantime, you can do something like `curl -H "$(cat
> .secret_auth_token)" ...` or something like that. It's not a cURL
> solution, but provides a workaround until your idea can be implemented.

I am afraid this is not going to help because command substitution gets
evaluated before executing curl. Consequently, the secret can still be
seen in the output of 'ps' as long as curl is running.

Kamil
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-15