Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow libcurl to use curlrc config file #3698

richm opened this issue Mar 22, 2019 · 1 comment

Allow libcurl to use curlrc config file #3698

richm opened this issue Mar 22, 2019 · 1 comment


Copy link

richm commented Mar 22, 2019

I did this

I'm writing a C application (rsyslog) which uses libcurl and I would like to be able to pass in a lot of parameters to libcurl without having to implement support for every single option to
pass in separately to curl_easy_setopt(). That's a lot of boilerplate code to have to write/debug/maintain, and that code has to be duplicated in every application that uses libcurl.

I expected the following

The curl cli has a -K option which you can use to pass in a config file, but it doesn't look as though this is part of the public API, and there is no option like CURLOPT_CONFIG_FILE for curl_easy_setopt(). Perhaps most of the code from src/tool_getparam.c and src/tool_operate.c and corresponding headers could be moved into libcurl and the public API. Bonus points for allowing all of the options that can be set in curlrc to also be set via environment variables (which is very nice for containerized/Kubernetes applications).

curl/libcurl version

curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets

operating system

Linux localhost 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Copy link

bagder commented Mar 25, 2019

Thanks, but this description sounds as if you're asking for a new feature/change. We use this tracker for bugs and issues only, we put ideas to work on in the future in the TODO document. We basically drown in good ideas so they don't do much use in our tracker.

If you really want to see this happen, start working on an implementation and submit a PR for it or join the mailing list and talk up more interest for it and see what help from others you can get!

@bagder bagder closed this as completed in 4018104 Mar 25, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

No branches or pull requests

2 participants