curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Resolved "--remote-header-name"?

From: Ray Satiro via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 15 Feb 2022 18:18:46 -0500

On 2/15/2022 5:41 PM, Paul Gilmartin via curl-users wrote:
> I'd like to be abele to use the resolved "--remote-header-name" as an
> argument to "--time-cond <filename>". But is there any way to find
> this before (or even after) the download completes?
>
> And I'd like to save the headers in a derived name such as
> "--dump-header <filename.HDRS>" so I could extract the Etag
> for a later curl command.
>
> Is there a way to do that, short of dumping the headers and
> replicating curls name resolution in a script?


To get the filename you can use --write-out %{filename_effective} [1]. 
Those keywords can't be used elsewhere, for example there's no
--dump-header %{filename_effective}.HDRS.


[1]: https://curl.se/docs/manpage.html#-w


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-02-16