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: debugging config files options
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Timothe Litt <litt_at_acm.org>
Date: Thu, 4 Apr 2024 19:46:38 -0400
On 04-Apr-24 17:47, Daniel Stenberg via curl-users wrote:
> Hello,
>
> Sometimes users accidentally get "funny" or unexplainable behavior
> from curl command lines when they have options added in their .curlrc
> or other config files.
>
> The use of .curlrc is a little subtle and sometimes hard to spot and I
> have pondered on what we can do to make it easier to debug or trace
> what options are being used in such config files.
>
> A challenge is that ~/.curlrc is read and parsed before any command
> line options. So how do we active the config file debug mode?
>
> 1. If -v or --verbose is used as the *first option* on the command line.
>
> 2. If the environment variable named CURL_CONFIG_TRACE is set to 1.
>
> Or can we come up with a better way?
>
One approach I've used is to look at the command name.
e.g. ln -s /usr/bin/curl /usr/bin/tcurl
tcurl ...
curl looks at $0 and enables tracing if called as tcurl.
similar to /bin/view which is a symlink to vi and triggers read-only mode.
Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.
Received on 2024-04-05
Date: Thu, 4 Apr 2024 19:46:38 -0400
On 04-Apr-24 17:47, Daniel Stenberg via curl-users wrote:
> Hello,
>
> Sometimes users accidentally get "funny" or unexplainable behavior
> from curl command lines when they have options added in their .curlrc
> or other config files.
>
> The use of .curlrc is a little subtle and sometimes hard to spot and I
> have pondered on what we can do to make it easier to debug or trace
> what options are being used in such config files.
>
> A challenge is that ~/.curlrc is read and parsed before any command
> line options. So how do we active the config file debug mode?
>
> 1. If -v or --verbose is used as the *first option* on the command line.
>
> 2. If the environment variable named CURL_CONFIG_TRACE is set to 1.
>
> Or can we come up with a better way?
>
One approach I've used is to look at the command name.
e.g. ln -s /usr/bin/curl /usr/bin/tcurl
tcurl ...
curl looks at $0 and enables tracing if called as tcurl.
similar to /bin/view which is a symlink to vi and triggers read-only mode.
Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html
- application/pgp-signature attachment: OpenPGP digital signature