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: feature request: support specifying Unix socket with systemd directive OpenFile=

From: Petr Pisar via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 21 Jun 2023 18:48:02 +0200

V Tue, Jun 20, 2023 at 03:44:10PM -0400, Rich Gray via curl-users napsal(a):
> Instead of adding a -fd variant to each command, maybe a more generic
> approach would be to have a syntax that indicates a filename is really an
> fd. Something like an ampersand followed by the digits of fd number. (An
> ampersand ('&') would require suitable command line escaping/quoting.) This
> could be used with any command that recognizes the alternative syntax. A
> favorite of mine would be -K, --config with an fd to hide command line
> options when a program is driving curl.
>
The syntax could be a URI. E.g. to use a fifth descriptor for reading
a configuration:

    --config fd://5

The only drawback is that it is an ill-formed, yet still accepted file
system path on many unices. E.g. Linux inteprets it as "./fd:/5". There would
be a change in behaviour for sloppy users who concatantes paths without
avoiding double slashes.

On the other hand, one could then write

    --config https://my.remote/file

to retrive the configuration with any curl-supported protocol.

-- Petr



-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-06-21