Buy commercial curl support. 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 Daniel himself.
Re: curl config file based on domain or inline variables based on request
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Thu, 11 Dec 2025 13:04:41 +0100 (CET)
On Thu, 11 Dec 2025, Bastian Jesuiter via curl-users wrote:
> The curlrc would include the a header with a {{ domain }} like variable
> syntax.
>
> Like:
> header _at_path/{{domain}}.txt
>
> Where the domain will be inferred by the given domain in the command.
I like this idea! Let me also mention that we have a similar idea listed in
the TODO:
https://curl.se/docs/todo.html#hostname-sections-in-config-files
It would get roughly the same thing with a syntax like this:
[domain]
header _at_path/special.txt
I think both takes could be worth exploring. They have roughly the same
challenge: they make it necessary to parse the config file (again?) after each
URL has been retrieved, so that it knows the domain.
Date: Thu, 11 Dec 2025 13:04:41 +0100 (CET)
On Thu, 11 Dec 2025, Bastian Jesuiter via curl-users wrote:
> The curlrc would include the a header with a {{ domain }} like variable
> syntax.
>
> Like:
> header _at_path/{{domain}}.txt
>
> Where the domain will be inferred by the given domain in the command.
I like this idea! Let me also mention that we have a similar idea listed in
the TODO:
https://curl.se/docs/todo.html#hostname-sections-in-config-files
It would get roughly the same thing with a syntax like this:
[domain]
header _at_path/special.txt
I think both takes could be worth exploring. They have roughly the same
challenge: they make it necessary to parse the config file (again?) after each
URL has been retrieved, so that it knows the domain.
-- / daniel.haxx.se || https://rock-solid.curl.dev -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2025-12-11