TODO
TODO
TODO
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
Things to do in project curl. Please tell us what you think, contribute and
send us patches that improve things.
Be aware that these are things that we could do, or have once been considered
things we could do. If you want to work on any of these areas, please
consider bringing it up for discussions first on the mailing list so that we
all agree it is still a good idea for the project.
All bugs documented in the KNOWN_BUGS document are subject for fixing.
1. libcurl
1.1 TFO support on Windows
1.2 Consult %APPDATA% also for .netrc
1.3 struct lifreq
1.4 alt-svc sharing
1.5 get rid of PATH_MAX
1.6 native IDN support on macOS
1.7 Support HTTP/2 for HTTP(S) proxies
1.8 CURLOPT_RESOLVE for any port number
1.9 Cache negative name resolves
1.10 auto-detect proxy
1.11 minimize dependencies with dynamically loaded modules
1.12 updated DNS server while running
1.13 c-ares and CURLOPT_OPENSOCKETFUNCTION
1.15 Monitor connections in the connection pool
1.16 Try to URL encode given URL
1.17 Add support for IRIs
1.18 try next proxy if one does not work
1.19 provide timing info for each redirect
1.20 SRV and URI DNS records
1.21 netrc caching and sharing
1.22 CURLINFO_PAUSE_STATE
1.23 Offer API to flush the connection pool
1.25 Expose tried IP addresses that failed
1.28 FD_CLOEXEC
1.29 Upgrade to websockets
1.30 config file parsing
1.31 erase secrets from heap/stack after use
1.32 add asynch getaddrinfo support
1.33 make DoH inherit more transfer properties
4. FTP
4.1 HOST
4.2 Alter passive/active on failure and retry
4.3 Earlier bad letter detection
4.4 Support CURLOPT_PREQUOTE for dir listings too
4.5 ASCII support
4.6 GSSAPI via Windows SSPI
4.7 STAT for LIST without data connection
4.8 Passive transfer could try other IP addresses
5. HTTP
5.1 Provide the error body from a CONNECT response
5.2 Set custom client ip when using haproxy protocol
5.3 Rearrange request header order
5.4 Allow SAN names in HTTP/2 server push
5.5 auth= in URLs
5.6 alt-svc should fallback if alt-svc does not work
5.7 Require HTTP version X or higher
6. TELNET
6.1 ditch stdin
6.2 ditch telnet-specific select
6.3 feature negotiation debug data
6.4 exit immediately upon connection if stdin is /dev/null
7. SMTP
7.1 Passing NOTIFY option to CURLOPT_MAIL_RCPT
7.2 Enhanced capability support
7.3 Add CURLOPT_MAIL_CLIENT option
8. POP3
8.2 Enhanced capability support
9. IMAP
9.1 Enhanced capability support
10. LDAP
10.1 SASL based authentication mechanisms
10.2 CURLOPT_SSL_CTX_FUNCTION for LDAPS
10.3 Paged searches on LDAP server
11. SMB
11.1 File listing support
11.2 Honor file timestamps
11.3 Use NTLMv2
11.4 Create remote directories
12. FILE
12.1 Directory listing for FILE:
13. TLS
13.1 TLS-PSK with OpenSSL
13.2 Provide mutex locking API
13.3 Defeat TLS fingerprinting
13.4 Cache/share OpenSSL contexts
13.5 Export session ids
13.6 Provide callback for cert verification
13.7 Less memory massaging with Schannel
13.8 Support DANE
13.9 TLS record padding
13.10 Support Authority Information Access certificate extension (AIA)
13.11 Support intermediate & root pinning for PINNEDPUBLICKEY
13.12 Reduce CA certificate bundle reparsing
13.13 Make sure we forbid TLS 1.3 post-handshake authentication
13.14 Support the clienthello extension
14. GnuTLS
14.2 check connection
15. Schannel
15.1 Extend support for client certificate authentication
15.2 Extend support for the --ciphers option
15.4 Add option to allow abrupt server closure
16. SASL
16.1 Other authentication mechanisms
16.2 Add QOP support to GSSAPI authentication
21. MQTT
21.1 Support rate-limiting
==============================================================================
1. libcurl
libcurl supports the CURLOPT_TCP_FASTOPEN option since 7.49.0 for Linux and
Mac OS. Windows supports TCP Fast Open starting with Windows 10, version 1607
and we should add support for it.
TCP Fast Open is supported on several platforms but not on Windows. Work on
this was once started but never finished.
See https://github.com/curl/curl/pull/3378
See https://github.com/curl/curl/issues/4016
The share interface could benefit from allowing the alt-svc cache to be
possible to share between easy handles.
See https://github.com/curl/curl/issues/4476
Currently the libssh2 SSH based code uses it, but to remove PATH_MAX from
there we need libssh2 to properly tell us when we pass in a too small buffer
and its current API (as of libssh2 1.2.7) does not.
On recent macOS versions, the getaddrinfo() function itself has built-in IDN
support. By setting the AI_CANONNAME flag, the function will return the
encoded name in the ai_canonname struct field in the returned information.
This could be used by curl on macOS when built without a separate IDN library
and an IDN host name is used in a URL.
Support for doing HTTP/2 to HTTP and HTTPS proxies is still missing.
See https://github.com/curl/curl/issues/3570
See https://github.com/curl/curl/issues/1264
A name resolve that has failed is likely to fail when made again within a
short period of time. Currently we only cache positive responses.
libcurl could be made to detect the system proxy setup automatically and use
that. On Windows, macOS and Linux desktops for example.
The pull-request to use libproxy for this was deferred due to doubts on the
reliability of the dependency and how to use it:
https://github.com/curl/curl/pull/977
https://github.com/curl/curl/issues/2251
curl will create most sockets via the CURLOPT_OPENSOCKETFUNCTION callback and
close them with the CURLOPT_CLOSESOCKETFUNCTION callback. However, c-ares
does not use those functions and instead opens and closes the sockets
itself. This means that when curl passes the c-ares socket to the
CURLMOPT_SOCKETFUNCTION it is not owned by the application like other sockets.
See https://github.com/curl/curl/issues/2734
libcurl's connection cache or pool holds a number of open connections for the
purpose of possible subsequent connection reuse. It may contain a few up to a
significant amount of connections. Currently, libcurl leaves all connections
as they are and first when a connection is iterated over for matching or
reuse purpose it is verified that it is still alive.
Those connections may get closed by the server side for idleness or they may
get an HTTP/2 ping from the peer to verify that they are still alive. By
adding monitoring of the connections while in the pool, libcurl can detect
dead connections (and close them) better and earlier, and it can handle
HTTP/2 pings to keep such ones alive even when not actively doing transfers
on them.
Given a URL that for example contains spaces, libcurl could have an option
that would try somewhat harder than it does now and convert spaces to %20 and
perhaps URL encoded byte values over 128 etc (basically do what the redirect
following code already does).
https://github.com/curl/curl/issues/514
IRIs (RFC 3987) allow localized, non-ascii, names in the URL. To properly
support this, curl/libcurl would need to translate/encode the given input
from the input string encoding into percent encoded output "over the wire".
To make that work smoothly for curl users even on Windows, curl would
probably need to be able to convert from several input encodings.
https://github.com/curl/curl/issues/896
https://github.com/curl/curl/issues/6743
Offer support for resolving SRV and URI DNS records for libcurl to know which
server to connect to for various protocols (including HTTP).
The netrc file is read and parsed each time a connection is setup, which
means that if a transfer needs multiple connections for authentication or
redirects, the file might be reread (and parsed) multiple times. This makes
it impossible to provide the file as a pipe.
1.22 CURLINFO_PAUSE_STATE
Sometimes applications want to flush all the existing connections kept alive.
An API could allow a forced flush or just a forced loop that would properly
close all connections that have been closed by the server already.
When libcurl fails to connect to a host, it could offer the application the
addresses that were used in the attempt. Source + dest IP, source + dest port
and protocol (UDP or TCP) for each failure. Possibly as a callback. Perhaps
also provide "reason".
https://github.com/curl/curl/issues/2126
1.28 FD_CLOEXEC
It sets the close-on-exec flag for the file descriptor, which causes the file
descriptor to be automatically (and atomically) closed when any of the
exec-family functions succeed. Should probably be set by default?
https://github.com/curl/curl/issues/2252
See https://github.com/curl/curl/issues/3698
Introducing a concept and system to erase secrets from memory after use, it
could help mitigate and lessen the impact of (future) security problems etc.
However: most secrets are passed to libcurl as clear text from the
application and then clearing them within the library adds nothing...
https://github.com/curl/curl/issues/7268
https://github.com/curl/curl/pull/6746
Some options are not inherited because they are not relevant for the DoH SSL
connections, or inheriting the option may result in unexpected behavior. For
example the user's debug function callback is not inherited because it would
be unexpected for internal handles (ie DoH handles) to be passed to that
callback.
See https://github.com/curl/curl/issues/6605
- TELNET transfers
If a name resolve has been initiated for name NN and a second easy handle
wants to resolve that name as well, make it wait for the first resolve to end
up in the cache instead of doing a second separate resolve. This is
especially needed when adding many simultaneous handles using the same host
name when the DNS resolver can get flooded.
The multi interface has a few API calls that assume a blocking behavior, like
add_handle() and remove_handle() which limits what we can do internally. The
multi API need to be moved even more into a single function that "drives"
everything in a non-blocking manner and signals when something is done. A
remove or add would then only ask for the action to get started and then
multi_perform() etc still be called until the add/remove is completed.
The multi interface treats the authentication process as part of the connect
phase. As such any failures during authentication will not trigger the relevant
QUIT or LOGOFF for protocols such as IMAP, POP3 and SMTP.
The multi_socket API should work with edge-triggered socket events. One of
the internal actions that need to be improved for this to work perfectly is
the 'maxloops' handling in transfer.c:readwrite_data().
See https://github.com/curl/curl/issues/3199
See https://github.com/curl/curl/issues/5835
See https://github.com/curl/curl/issues/4829
3. Documentation
See https://github.com/curl/curl/issues/6968
4. FTP
4.1 HOST
HOST is a command for a client to tell which host name to use, to offer FTP
servers named-based virtual hosting:
https://datatracker.ietf.org/doc/html/rfc7151
Make the detection of (bad) %0d and %0a codes in FTP URL parts earlier in the
process to avoid doing a resolve and connect in vain.
The lack of support is mostly an oversight and requires the FTP state machine
to get updated to get fixed.
https://github.com/curl/curl/issues/8602
FTP ASCII transfers do not follow RFC959. They do not convert the data
accordingly.
When doing FTP operations through a proxy at localhost, the reported spotted
that curl only tried to connect once to the proxy, while it had multiple
addresses and a failed connect on one address should make it try the next.
After switching to passive mode (EPSV), curl could try all IP addresses for
"localhost". Currently it tries ::1, but it should also try 127.0.0.1.
See https://github.com/curl/curl/issues/1508
5. HTTP
When curl receives a body response from a CONNECT request to a proxy, it will
always just read and ignore it. It would make some users happy if curl
instead optionally would be able to make that responsible available. Via a new
callback? Through some other means?
See https://github.com/curl/curl/issues/9513
This would allow testing servers with different client ip addresses (without
using x-forward-for header).
https://github.com/curl/curl/issues/5125
curl only allows HTTP/2 push promise if the provided :authority header value
exactly matches the host name given in the URL. It could be extended to allow
any name that would match the Subject Alternative Names in the server's TLS
certificate.
See https://github.com/curl/curl/pull/3581
For example:
The alt-svc: header provides a set of alternative services for curl to use
instead of the original. If the first attempted one fails, it should try the
next etc and if all alternatives fail go back to the original.
See https://github.com/curl/curl/issues/4908
curl and libcurl provide options for trying higher HTTP versions (for example
HTTP/2) but then still allows the server to pick version 1.1. We could
consider adding a way to require a minimum version.
See https://github.com/curl/curl/issues/7980
6. TELNET
Reading input (to send to the remote server) on stdin is a crappy solution
for library purposes. We need to invent a good way for the application to be
able to provide the data to send.
Move the telnet support's network select() loop go away and merge the code
into the main transfer loop. Until this is done, the multi interface will not
work for telnet.
Add telnet feature negotiation data to the debug callback as header data.
7. SMTP
Add the ability, for an application that uses libcurl, to obtain the list of
capabilities returned from the EHLO command.
Rather than use the URL to specify the mail client string to present in the
HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
specifying this data as the URL is non-standard and to be honest a bit of a
hack ;-)
8. POP3
Add the ability, for an application that uses libcurl, to obtain the list of
capabilities returned from the CAPA command.
9. IMAP
Add the ability, for an application that uses libcurl, to obtain the list of
capabilities returned from the CAPABILITY command.
10. LDAP
https://github.com/curl/curl/issues/4108
https://github.com/curl/curl/issues/4452
11. SMB
Add support for listing the contents of a SMB share. The output should
probably be the same as/similar to FTP.
The timestamp of the transferred file should reflect that of the original
file.
12. FILE
Add support for listing the contents of a directory accessed with FILE. The
output should probably be the same as/similar to FTP.
13. TLS
https://github.com/curl/curl/issues/5081
Provide a libcurl API for setting mutex callbacks in the underlying SSL
library, so that the same application code can use mutex-locking
independently of OpenSSL or GnutTLS being used.
See https://github.com/curl/curl/issues/8119
"Look at SSL cafile - quick traces look to me like these are done on every
request as well, when they should only be necessary once per SSL context (or
once per handle)". The major improvement we can rather easily do is to make
sure we do not create and kill a new SSL "context" for every request, but
instead make one for every connection and re-use that SSL context in the same
style connections are re-used. It will make us use slightly more memory but
it will libcurl do less creations and deletions of SSL contexts.
Technically, the "caching" is probably best implemented by getting added to
the share interface so that easy handles who want to and can reuse the
context specify that by sharing with the right properties set.
https://github.com/curl/curl/issues/1110
The Schannel backend does a lot of custom memory management we would rather
avoid: the repeated alloc + free in sends and the custom memory + realloc
system for encrypted and decrypted data. That should be avoided and reduced
for 1) efficiency and 2) safety.
Björn Stenberg wrote a separate initial take on DANE that was never
completed.
TLS (1.3) offers optional record padding and OpenSSL provides an API for it.
I could make sense for libcurl to offer this ability to applications to make
traffic patterns harder to figure out by network traffic observers.
See https://github.com/curl/curl/issues/5398
AIA can provide various things like CRLs but more importantly information
about intermediate CA certificates that can allow validation path to be
fulfilled when the HTTPS server does not itself provide them.
Adding this feature would make curls pinning 100% compatible to HPKP and
allow more flexible pinning.
When using the OpenSSL backend, curl will load and reparse the CA bundle at
the creation of the "SSL context" when it sets up a connection to do a TLS
handshake. A more effective way would be to somehow cache the CA bundle to
avoid it having to be repeatedly reloaded and reparsed.
See https://github.com/curl/curl/issues/9379
RFC 8740 explains how using HTTP/2 must forbid the use of TLS 1.3
post-handshake authentication. We should make sure to live up to that.
See https://github.com/curl/curl/issues/5396
Certain stupid networks and middle boxes have a problem with SSL handshake
packets that are within a certain size range because how that sets some bits
that previously (in older TLS version) were not set. The clienthello
extension adds padding to avoid that size range.
https://datatracker.ietf.org/doc/html/rfc7685
https://github.com/curl/curl/issues/2299
14. GnuTLS
15. Schannel
The existing support for the -E/--cert and --key options could be
extended by supplying a custom certificate and key in PEM format, see:
- Getting a Certificate for Schannel
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
libcurl w/schannel will error without a known termination point from the
server (such as length of transfer, or SSL "close notify" alert) to prevent
against a truncation attack. Really old servers may neglect to send any
termination point. An option could be added to ignore such abrupt closures.
https://github.com/curl/curl/issues/4427
16. SASL
Currently the GSSAPI authentication only supports the default QOP of auth
(Authentication), whilst Kerberos V5 supports both auth-int (Authentication
with integrity protection) and auth-conf (Authentication with integrity and
privacy protection).
17.1 Multiplexing
To fix this, libcurl would have to detect an existing connection and "attach"
the new transfer to the existing one.
The SFTP code in libcurl checks the file size *before* a transfer starts and
then proceeds to transfer exactly that amount of data. If the remote file
grows while the transfer is in progress libcurl will not notice and will not
adapt. The OpenSSH SFTP command line tool does and libcurl could also just
attempt to download more to see if there is more to get...
https://github.com/curl/curl/issues/4344
The libssh2 backend in curl is limited to only reading keys from id_rsa and
id_dsa, which makes it fail connecting to servers that use more modern key
types.
https://github.com/curl/curl/issues/8586
17.4 Support CURLOPT_PREQUOTE
The two other QUOTE options are supported for SFTP, but this was left out for
unknown reasons.
The SSH based protocols SFTP and SCP did not work over HTTPS proxy at
all until PR https://github.com/curl/curl/pull/6021 brought the
functionality with the libssh2 backend. Presumably, this support
can/could be added for the other backends as well.
OpenSSH 9 switched their 'scp' tool to speak SFTP under the hood. Going
forward it might be worth having curl or libcurl attempt SFTP if SCP fails to
follow suite.
18.1 sync
Downloads a range or set of URLs using the remote name, but only if the
remote file is newer than the local file. A Last-Modified HTTP date header
should also be used to set the mod date on the downloaded file.
18.4 --proxycommand
Allow the user to make curl run a command and use its stdio to make requests
and not do any network connection by itself. Example:
See https://github.com/curl/curl/issues/4941
RFC 6266 documents how UTF-8 names can be passed to a client in the
Content-Disposition header, and curl does not support this.
https://github.com/curl/curl/issues/1888
When a user requests multiple lined based files using -Z and sends them to
stdout, curl will not "merge" and send complete lines fine but may send
partial lines from several sources.
https://github.com/curl/curl/issues/5175
18.8 Consider convenience options for JSON and XML?
Could we add `--xml` or `--json` to add headers needed to call rest API:
Setting Content-Type when doing a GET or any other method without a body
would be a bit strange I think - so maybe only add CT for requests with body?
Maybe plain `--xml` and ` --json` are a bit too brief and generic. Maybe
`--http-json` etc?
See https://github.com/curl/curl/issues/5203
When using braces to download a list of URLs and you use complicated names
in the list of alternatives, it could be handy to allow curl to use other
names when saving.
See https://github.com/curl/curl/issues/221
If you pull the scrollbar when transferring with curl in a Windows console
window, the transfer is interrupted and can get disconnected. This can
probably be improved. See https://github.com/curl/curl/issues/322
Downloads in progress are neither ready to be backed up, nor should they be
opened by a different process. Only after a download has been completed it's
sensible to include it in any integer snapshot or backup of the system.
See https://github.com/curl/curl/issues/3354
Provide an option that makes curl not exit after the last URL (or even work
without a given URL), and then make it read instructions passed on a pipe or
over a socket to make further instructions so that a second subsequent curl
invoke can talk to the still running instance and ask for transfers to get
done, and thus maintain its connection pool, DNS cache and more.
Consider a command line option that can make curl do multiple serial requests
slow, potentially with a (random) wait between transfers. There's also a
proposed set of standard HTTP headers to let servers let the client adapt to
its rate limits:
https://www.ietf.org/id/draft-polli-ratelimit-headers-02.html
See https://github.com/curl/curl/issues/5406
18.14 --dry-run
A command line option that makes curl show exactly what it would do and send
if it would run for real.
See https://github.com/curl/curl/issues/5426
When --retry is used and curl actually retries transfer, it should use the
already transferred data and do a resumed transfer for the rest (when
possible) so that it does not have to transfer the same data again that was
already transferred before the retry.
See https://github.com/curl/curl/issues/1084
When the user only wants to send a small piece of the data provided with
--data or --data-binary, like when that data is a huge file, consider a way
to specify that curl should only send a piece of that. One suggested syntax
would be: "--data-binary @largefile.zip!1073741823-2147483647".
See https://github.com/curl/curl/issues/1200
When a user gives a URL and uses -O, and curl follows a redirect to a new
URL, the file name is not extracted and used from the newly redirected-to URL
even if the new URL may have a much more sensible file name.
This is clearly documented and helps for security since there's no surprise
to users which file name that might get overwritten. But maybe a new option
could allow for this or maybe -J should imply such a treatment as well as -J
already allows for the server to decide what file name to use so it already
provides the "may overwrite any file" risk.
This is extra tricky if the original URL has no file name part at all since
then the current code path will error out with an error message, and we cannot
*know* already at that point if curl will be redirected to a URL that has a
file name...
See https://github.com/curl/curl/issues/1241
https://github.com/curl/curl/issues/1603
See https://github.com/curl/curl/issues/2317
See https://github.com/curl/curl/issues/5462
For SFTP and possibly FTP, curl could offer an option to set the
modification time for the uploaded file.
See https://github.com/curl/curl/issues/5768
This way, if transfer B fails (because Range: is not supported) it will let
transfer A remain the single one. N and M could be set to some sensible
defaults.
See https://github.com/curl/curl/issues/5774
See https://github.com/curl/curl/issues/6150
18.26 Custom progress meter update interval
Users who are for example doing large downloads in CI or remote setups might
want the occasional progress meter update to see that the transfer is
progressing and has not stuck, but they may not appreciate the
many-times-a-second frequency curl can end up doing it with now.
-O also does not decode %-encoded names, and while it has even less
information about the charset involved the process is similar to the -J case.
Note that we will not add decoding to -O without the user asking for it with
some other means as well, since -O has always been documented to use the name
exactly as specified in the URL.
18.28 -J with -C -
When using -J (with -O), automatically resumed downloading together with "-C
-" fails. Without -J the same command line works. This happens because the
resume logic is worked out before the target file name (and thus its
pre-transfer size) has been figured out. This can be improved.
https://curl.se/bug/view.cgi?id=1169
19. Build
19.1 roffit
Consider extending 'roffit' to produce decent ASCII output, and use that
instead of (g)nroff when building src/tool_hugehelp.c
Especially when having programs that execute curl via the command line, PIE
renders the exploitation of memory corruption vulnerabilities a lot more
difficult. This can be attributed to the additional information leaks being
required to conduct a successful attack. RELRO, on the other hand, masks
different binary sections like the GOT as read-only and thus kills a handful
of techniques that come in handy when attackers are able to arbitrarily
overwrite memory. A few tests showed that enabling these features had close
to no impact, neither on the performance nor on the general functionality of
curl.
See https://github.com/curl/curl/issues/5862
See https://github.com/curl/curl/issues/5424
The configure script can be improved to cache more values so that repeated
invokes run much faster.
See https://github.com/curl/curl/issues/7753
The user wants an easier way to tell autotools to build curl with Windows
Unicode support, like ./configure --enable-windows-unicode
See https://github.com/curl/curl/issues/7229
Make our own version of stunnel for simple port forwarding to enable HTTPS
and FTP-SSL tests without the stunnel dependency, and it could allow us to
provide test tools built with either OpenSSL or GnuTLS
If perl was not found by the configure script, do not attempt to run the tests
but explain something nice why it does not.
Extend the test suite to include more protocols. The telnet could just do FTP
or http operations (for which we have test servers).
Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
fork()s and it should become even more portable.
Tests 836, 882 and 938 were designed to verify that separate connections
are not used when using different login credentials in protocols that
should not re-use a connection under such circumstances.
A test suite made for HTTP cookies (RFC 6265) by Adam Barth is available at
https://github.com/abarth/http-state/tree/master/tests
It'd be really awesome if someone would write a script/setup that would run
curl with that test suite and detect deviances. Ideally, that would even be
incorporated into our regular test suite.
LD_RELOAD does not work on macOS, but there are tests which require it to run
properly. Look into making the preload support in runtests.pl portable such
that it uses DYLD_INSERT_LIBRARIES on macOS.
Run web-platform-tests URL tests and compare results with browsers on wpt.fyi
It would help us find issues to fix and help us document where our parser
differs from the WHATWG URL spec parsers.
See https://github.com/curl/curl/issues/4477
21. MQTT
The rate-limiting logic is done in the PERFORMING state in multi.c but MQTT
is not (yet) implemented to use that.