diff --git a/SUMMARY.md b/SUMMARY.md index e124f6968f..11601740aa 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -51,7 +51,11 @@ * [BoringSSL](build/boringssl.md) * [Command line concepts](cmdline/README.md) * [Differences](cmdline/differences.md) - * [Command line options](cmdline/options.md) + * [Command line options](cmdline/options/README.md) + * [Short options](cmdline/options/short.md) + * [Long options](cmdline/options/long.md) + * [Arguments to options](cmdline/options/args.md) + * [Negative options](cmdline/options/negative.md) * [Options depend on version](cmdline/versions.md) * [URLs](cmdline/urls/README.md) * [Scheme](cmdline/urls/scheme.md) @@ -64,17 +68,16 @@ * [Fragment](cmdline/urls/fragment.md) * [Browsers](cmdline/urls/browsers.md) * [Many options and URLs](cmdline/urls/options.md) + * [URL globbing](cmdline/urls/globbing.md) * [Connection reuse](cmdline/urls/connreuse.md) * [Parallel transfers](cmdline/urls/parallel.md) * [trurl](cmdline/urls/trurl.md) - * [URL globbing](cmdline/globbing.md) * [List options](cmdline/listopts.md) * [Config file](cmdline/configfile.md) * [Variables](cmdline/variables.md) * [Passwords](cmdline/passwords.md) * [Progress meter](cmdline/progressmeter.md) * [Version](cmdline/curlver.md) - * [Persistent connections](cmdline/persist.md) * [Exit code](cmdline/exitcode.md) * [Copy as curl](cmdline/copyas.md) * [Command line transfers](usingcurl/README.md) diff --git a/bookindex.md b/bookindex.md index 5febe0ece2..2b20a94f33 100644 --- a/bookindex.md +++ b/bookindex.md @@ -34,8 +34,8 @@ - configure: [root](source/layout.md#root), [Handling build options](source/options.md#handling-build-options), [Platform dependent code](source/style.md#platform-dependent-code), [Autotools](build/autotools.md#autotools), [`rpath`](build/separate.md#rpath), [configure](build/tls.md#configure), [set up the build tree to get detected by curl's configure](build/boringssl.md#set-up-the-build-tree-to-get-detected-by-curls-configure), [Ifdefs](internals/windows-vs-unix.md#ifdefs), [Memory debugging](internals/memory-debugging.md#memory-debugging), [Debug builds](internals/tests/debug.md#debug-builds) - --connect-timeout: [Connection timeout](usingcurl/connections/timeout.md#connection-timeout), [Never spend more than this to connect](usingcurl/timeouts.md#never-spend-more-than-this-to-connect) - --connect-to: [Provide a replacement name](usingcurl/connections/name.md#provide-a-replacement-name) - - connection cache: [Persistent connections](cmdline/persist.md#persistent-connections), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Connection cache](libcurl/caches.md#connection-cache), [All options](transfers/options/all.md#all-options), [Connection reuse](transfers/conn/reuse.md#connection-reuse), [Multi handle](helpers/sharing.md#multi-handle), [connection cache](internals/caches.md#connection-cache), [connectdata](internals/structs.md#connectdata) - - connection pool: [Connection reuse](cmdline/urls/connreuse.md#connection-reuse), [Persistent connections](cmdline/persist.md#persistent-connections), [Connection cache](libcurl/caches.md#connection-cache), [pool size](libcurl/performance.md#pool-size), [Connection reuse](transfers/conn/reuse.md#connection-reuse), [connection cache](internals/caches.md#connection-cache) + - connection cache: [Connection reuse](cmdline/urls/connreuse.md#connection-reuse), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Connection cache](libcurl/caches.md#connection-cache), [All options](transfers/options/all.md#all-options), [Connection reuse](transfers/conn/reuse.md#connection-reuse), [Multi handle](helpers/sharing.md#multi-handle), [connection cache](internals/caches.md#connection-cache), [connectdata](internals/structs.md#connectdata) + - connection pool: [Connection reuse](cmdline/urls/connreuse.md#connection-reuse), [Connection cache](libcurl/caches.md#connection-cache), [pool size](libcurl/performance.md#pool-size), [Connection reuse](transfers/conn/reuse.md#connection-reuse), [connection cache](internals/caches.md#connection-cache) - Connection reuse: [Connection reuse](cmdline/urls/connreuse.md#connection-reuse), [Connection cache](libcurl/caches.md#connection-cache), [threads](libcurl/performance.md#threads), [Connection reuse](transfers/conn/reuse.md#connection-reuse) - content-encoding: [Transfer encoding](http/response.md#transfer-encoding), [Compression](http/modify/compression.md#compression), [About content encodings](internals/content-encoding.md#about-content-encodings) - contribute: [Code of Conduct](project/coc.md#code-of-conduct), [Contributing](source/contributing.md#contributing), [Introduction](README.md#introduction) @@ -182,8 +182,8 @@ ## D - - -d: [Arguments to options](cmdline/options.md#arguments-to-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [POST](usingcurl/uploads.md#post), [MQTT](usingcurl/mqtt.md#mqtt), [Method](http/method.md#method), [Simple POST](http/post/simple.md#simple-post), [Content-Type](http/post/content-type.md#content-type), [Posting binary](http/post/binary.md#posting-binary), [Convert to GET](http/post/convert-to-get.md#convert-to-get), [Expect 100-continue](http/post/expect100.md#expect-100-continue), [Chunked encoded POSTs](http/post/chunked.md#chunked-encoded-posts), [Hidden form fields](http/post/hiddenfields.md#hidden-form-fields), [-d vs -F](http/post/postvspost.md#sect--d-vs--f), [HTTP PUT](http/put.md#http-put), [Web logins and sessions](http/browserlike.md#web-logins-and-sessions) - - --data: [Arguments to options](cmdline/options.md#arguments-to-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [POST](usingcurl/uploads.md#post), [Simple POST](http/post/simple.md#simple-post), [JSON](http/post/json.md#json), [URL encode data](http/post/url-encode.md#url-encode-data) + - -d: [Arguments to options](cmdline/options/args.md#arguments-to-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [POST](usingcurl/uploads.md#post), [MQTT](usingcurl/mqtt.md#mqtt), [Method](http/method.md#method), [Simple POST](http/post/simple.md#simple-post), [Content-Type](http/post/content-type.md#content-type), [Posting binary](http/post/binary.md#posting-binary), [Convert to GET](http/post/convert-to-get.md#convert-to-get), [Expect 100-continue](http/post/expect100.md#expect-100-continue), [Chunked encoded POSTs](http/post/chunked.md#chunked-encoded-posts), [Hidden form fields](http/post/hiddenfields.md#hidden-form-fields), [-d vs -F](http/post/postvspost.md#sect--d-vs--f), [HTTP PUT](http/put.md#http-put), [Web logins and sessions](http/browserlike.md#web-logins-and-sessions) + - --data: [Arguments to options](cmdline/options/args.md#arguments-to-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [POST](usingcurl/uploads.md#post), [Simple POST](http/post/simple.md#simple-post), [JSON](http/post/json.md#json), [URL encode data](http/post/url-encode.md#url-encode-data) - --data-binary: [Not perfect](cmdline/copyas.md#not-perfect), [Simple POST](http/post/simple.md#simple-post), [Posting binary](http/post/binary.md#posting-binary), [URL encode data](http/post/url-encode.md#url-encode-data) - --data-urlencode: [Query](cmdline/urls/query.md#query), [URL encode data](http/post/url-encode.md#url-encode-data), [Convert to GET](http/post/convert-to-get.md#convert-to-get) - debian: [Ubuntu and Debian](install/linux.md#ubuntu-and-debian), [Version](cmdline/curlver.md#version) @@ -221,7 +221,7 @@ - --get: [trurl example command lines](cmdline/urls/trurl.md#trurl-example-command-lines), [Convert to GET](http/post/convert-to-get.md#convert-to-get) - git: [Daily snapshots](project/releases.md#daily-snapshots), [Building libcurl on MSYS2](install/windows/win-msys2.md#building-libcurl-on-msys2), [root](source/layout.md#root), [git](source/contributing.md#git), [Website](source/web.md#website), [build boringssl](build/boringssl.md#build-boringssl), [Continuous Integration](internals/tests/ci.md#continuous-integration), [Autobuilds](internals/tests/autobuilds.md#autobuilds) - - Globbing: [URL globbing](cmdline/globbing.md#url-globbing), [Uploading with FTP](ftp/upload.md#uploading-with-ftp) + - Globbing: [URL globbing](cmdline/urls/globbing.md#url-globbing), [Uploading with FTP](ftp/upload.md#uploading-with-ftp) - GnuTLS: [lib/vtls](source/layout.md#lib-slash-vtls), [Select TLS backend](build/autotools.md#select-tls-backend), [TLS libraries](build/tls.md#tls-libraries), [Native CA stores](usingcurl/tls/verify.md#native-ca-stores), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Restrictions](usingcurl/tls/sslkeylogfile.md#restrictions), [``](internals/tests/file-format.md#sect--less-than-features-greater-than) - GOPHER: [How it started](project/started.md#how-it-started), [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [GOPHER](protocols/curl.md#gopher), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Version](cmdline/curlver.md#version), [Variables](internals/tests/file-format.md#variables) - GOPHERS: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [GOPHERS](protocols/curl.md#gophers), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Variables](internals/tests/file-format.md#variables) @@ -239,7 +239,7 @@ - --hsts: [HSTS cache](http/https/hsts.md#hsts-cache) - HSTS: [HTTPS](http/https.md#https), [HSTS](http/https/hsts.md#hsts), [All options](transfers/options/all.md#all-options), [HSTS](transfers/callbacks/hsts.md#hsts), [HSTS](libcurl-http/hsts.md#hsts), [HSTS](internals/caches.md#hsts), [``](internals/tests/file-format.md#sect--less-than-features-greater-than) - HTTP proxy: [How it started](project/started.md#how-it-started), [Proxy type](usingcurl/proxies/type.md#proxy-type), [HTTP proxy](usingcurl/proxies/http.md#http-proxy), [Proxy headers](usingcurl/proxies/headers.md#proxy-headers), [Authentication](http/auth.md#authentication), [All options](transfers/options/all.md#all-options), [HTTP proxy](transfers/conn/proxies.md#http-proxy), [Available information](transfers/getinfo.md#available-information), [``](internals/tests/file-format.md#sect--less-than-proxy--nonewline-yes--greater-than) - - HTTP redirects: [Short options](cmdline/options.md#short-options), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects), [Submit a login form over HTTP](examples/login.md#submit-a-login-form-over-http) + - HTTP redirects: [Short options](cmdline/options/short.md#short-options), [Long options](cmdline/options/long.md#long-options), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects), [Submit a login form over HTTP](examples/login.md#submit-a-login-form-over-http) - HTTP Strict Transport Security: [HSTS](http/https/hsts.md#hsts), [HSTS](transfers/callbacks/hsts.md#hsts), [HSTS](internals/caches.md#hsts) - HTTP/1.1: [HTTP](protocols/curl.md#http), [HTTP basics](protocols/http.md#http-basics), [Trace options](usingcurl/verbose/trace.md#trace-options), [HTTP/2](usingcurl/proxies/https.md#http-slash-2), [Debugging with TELNET](usingcurl/telnet.md#debugging-with-telnet), [HTTP/2](http/versions/http2.md#http-slash-2), [Caveats](http/post/chunked.md#caveats), [The HTTP this generates](http/post/multipart.md#the-http-this-generates), [GET or POST?](http/redirects.md#get-or-post), [Request method](http/modify/method.md#request-method), [Request target](http/modify/target.md#request-target), [Customize HTTP request headers](libcurl-http/requests.md#customize-http-request-headers), [Versions](libcurl-http/versions.md#versions), [About content encodings](internals/content-encoding.md#about-content-encodings) - HTTP/2: [HTTP](protocols/curl.md#http), [docs](source/layout.md#docs), [nghttp2](build/deps.md#nghttp2), [Line 4: Features](cmdline/curlver.md#line-4-features), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [More data](usingcurl/verbose/trace.md#more-data), [HTTP/2](usingcurl/proxies/https.md#http-slash-2), [HTTP/2](http/versions/http2.md#http-slash-2), [HTTP/3](http/versions/http3.md#http-slash-3), [HTTP/2 and later](http/post/expect100.md#http-slash-2-and-later), [GET or POST?](http/redirects.md#get-or-post), [HTTP headers](http/modify/compression.md#http-headers), [HTTP/3](http/https/altsvc.md#http-slash-3), [Trace more](libcurl/verbose.md#trace-more), [When connections are not reused as you want](transfers/conn/reuse.md#when-connections-are-not-reused-as-you-want), [QUIC and HTTP/2](transfers/conn/keepalive.md#quic-and-http-slash-2), [DNS over HTTPS](transfers/conn/names.md#dns-over-https), [HTTPS proxy](transfers/conn/proxies.md#https-proxy), [Versions](libcurl-http/versions.md#versions), [Expect: headers](libcurl-http/upload.md#expect-headers), [Multiplexing](libcurl-http/multiplexing.md#multiplexing), [HTTP/3](libcurl-http/alt-svc.md#http-slash-3), [Different backends](internals/backends.md#different-backends), [Curl_easy](internals/structs.md#curl_easy), [Variables](internals/tests/file-format.md#variables) @@ -262,14 +262,14 @@ - IPFS: [IPFS](usingcurl/ipfs.md#ipfs) - --ipfs-gateway: [Gateway](usingcurl/ipfs.md#gateway) - IPv4: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [`host*.c` sources](internals/resolving.md#host-dot-c-sources), [Variables](internals/tests/file-format.md#variables) - - IPv6: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [URL globbing](cmdline/globbing.md#url-globbing), [Version](cmdline/curlver.md#version), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [SOCKS proxy](usingcurl/proxies/socks.md#socks-proxy), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [Zone ID](helpers/url/get-part.md#zone-id), [`CURLRES_IPV6`](internals/resolving.md#curlres_ipv6), [Variables](internals/tests/file-format.md#variables) + - IPv6: [Host](cmdline/urls/host.md#host), [Port number](cmdline/urls/port.md#port-number), [URL globbing](cmdline/urls/globbing.md#url-globbing), [Version](cmdline/curlver.md#version), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [SOCKS proxy](usingcurl/proxies/socks.md#socks-proxy), [curl and haproxy](usingcurl/proxies/haproxy.md#curl-and-haproxy), [All options](transfers/options/all.md#all-options), [How libcurl connects](transfers/conn/how.md#how-libcurl-connects), [Name resolving](transfers/conn/names.md#name-resolving), [Zone ID](helpers/url/get-part.md#zone-id), [`CURLRES_IPV6`](internals/resolving.md#curlres_ipv6), [Variables](internals/tests/file-format.md#variables) - IRC: [How it started](project/started.md#how-it-started), [Project communication](project/comm.md#project-communication) ## J - JavaScript: [Client differences](usingcurl/downloads/browsers.md#client-differences), [PAC](usingcurl/proxies/pac.md#pac), [JavaScript and forms](http/post/javascript.md#javascript-and-forms), [JavaScript redirects](http/redirects.md#javascript-redirects), [Figure out what the browser does](http/browserlike.md#figure-out-what-the-browser-does) - --json: [trurl example command lines](cmdline/urls/trurl.md#trurl-example-command-lines), [JSON](http/post/json.md#json) - - json: [Arguments with spaces](cmdline/options.md#arguments-with-spaces), [Functions](cmdline/variables.md#functions), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Content-Type](http/post/content-type.md#content-type), [JSON](http/post/json.md#json), [POST outside of HTML](http/post/postvspost.md#post-outside-of-html) + - json: [Arguments with spaces](cmdline/options/args.md#arguments-with-spaces), [Functions](cmdline/variables.md#functions), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Content-Type](http/post/content-type.md#content-type), [JSON](http/post/json.md#json), [POST outside of HTML](http/post/postvspost.md#post-outside-of-html) ## K @@ -280,7 +280,7 @@ ## L - - -L: [Short options](cmdline/options.md#short-options), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects), [Request method](http/modify/method.md#request-method), [Cookie engine](http/cookies/engine.md#cookie-engine), [Reading cookies from file](http/cookies/reading.md#reading-cookies-from-file), [Redirects](http/browserlike.md#redirects) + - -L: [Short options](cmdline/options/short.md#short-options), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects), [Request method](http/modify/method.md#request-method), [Cookie engine](http/cookies/engine.md#cookie-engine), [Reading cookies from file](http/cookies/reading.md#reading-cookies-from-file), [Redirects](http/browserlike.md#redirects) - LD_LIBRARY_PATH: [`LD_LIBRARY_PATH`](build/separate.md#ld_library_path) - --libcurl: [--libcurl](libcurl/--libcurl.md#sect---libcurl) - libcurl version: [Line 1: curl](cmdline/curlver.md#line-1-curl), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Which libcurl version](libcurl/api.md#which-libcurl-version), [Network data conversion](transfers/callbacks/conversions.md#network-data-conversion) @@ -292,7 +292,7 @@ - libssh2: [SSH libraries](build/deps.md#ssh-libraries), [``](internals/tests/file-format.md#sect--less-than-features-greater-than) - license: [Finding users](project/users.md#finding-users), [License](source/opensource/license.md#license), [root](source/layout.md#root), [License](README.md#license) - --limit-rate: [Rate limiting](usingcurl/transfers/rate-limiting.md#rate-limiting) - - --location: [Long options](cmdline/options.md#long-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [Syntax](cmdline/configfile.md#syntax), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects) + - --location: [Long options](cmdline/options/long.md#long-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [Syntax](cmdline/configfile.md#syntax), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects) ## M @@ -321,7 +321,7 @@ ## O - - -O: [Many options and URLs](cmdline/urls/options.md#many-options-and-urls), [Numerical ranges](cmdline/globbing.md#numerical-ranges), [Download to a file named by the URL](usingcurl/downloads/url-named.md#download-to-a-file-named-by-the-url), [Use the target filename from the server](usingcurl/downloads/content-disp.md#use-the-target-filename-from-the-server), [Shell redirects](usingcurl/downloads/redirects.md#shell-redirects), [Multiple downloads](usingcurl/downloads/multiple.md#multiple-downloads), [Resuming and ranges](usingcurl/downloads/resume.md#resuming-and-ranges), [Request rate limiting](usingcurl/transfers/request-rate.md#request-rate-limiting), [For SFTP/SCP](usingcurl/transfers/compression.md#for-sftp-slash-scp), [Authentication](usingcurl/ssh/auth.md#authentication), [Download](usingcurl/tftp.md#download), [Check by modification date](http/modify/conditionals.md#check-by-modification-date) + - -O: [Many options and URLs](cmdline/urls/options.md#many-options-and-urls), [Numerical ranges](cmdline/urls/globbing.md#numerical-ranges), [Download to a file named by the URL](usingcurl/downloads/url-named.md#download-to-a-file-named-by-the-url), [Use the target filename from the server](usingcurl/downloads/content-disp.md#use-the-target-filename-from-the-server), [Shell redirects](usingcurl/downloads/redirects.md#shell-redirects), [Multiple downloads](usingcurl/downloads/multiple.md#multiple-downloads), [Resuming and ranges](usingcurl/downloads/resume.md#resuming-and-ranges), [Request rate limiting](usingcurl/transfers/request-rate.md#request-rate-limiting), [For SFTP/SCP](usingcurl/transfers/compression.md#for-sftp-slash-scp), [Authentication](usingcurl/ssh/auth.md#authentication), [Download](usingcurl/tftp.md#download), [Check by modification date](http/modify/conditionals.md#check-by-modification-date) - openldap: [openldap](build/deps.md#openldap) - OpenSSL: [Get curl and libcurl on MSYS2](install/windows/win-msys2.md#get-curl-and-libcurl-on-msys2), [lib/vtls](source/layout.md#lib-slash-vtls), [Select TLS backend](build/autotools.md#select-tls-backend), [TLS libraries](build/tls.md#tls-libraries), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Native CA stores](usingcurl/tls/verify.md#native-ca-stores), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Restrictions](usingcurl/tls/sslkeylogfile.md#restrictions), [CA cert cache](libcurl/caches.md#ca-cert-cache), [All options](transfers/options/all.md#all-options), [SSL context](transfers/callbacks/sslcontext.md#ssl-context), [Available information](transfers/getinfo.md#available-information), [``](internals/tests/file-format.md#sect--less-than-features-greater-than) - --output-dir: [Store in another directory](usingcurl/downloads/url-named.md#store-in-another-directory) @@ -357,11 +357,11 @@ ## R - - ranges: [Numerical ranges](cmdline/globbing.md#numerical-ranges), [Resuming and ranges](usingcurl/downloads/resume.md#resuming-and-ranges), [A range trick](http/modify/fragment.md#a-range-trick), [Ranges](http/modify/ranges.md#ranges), [Provide a file descriptor](transfers/callbacks/openclosesocket.md#provide-a-file-descriptor), [HTTP response code](libcurl-http/responses.md#http-response-code), [Ranges](libcurl-http/ranges.md#ranges) + - ranges: [Numerical ranges](cmdline/urls/globbing.md#numerical-ranges), [Resuming and ranges](usingcurl/downloads/resume.md#resuming-and-ranges), [A range trick](http/modify/fragment.md#a-range-trick), [Ranges](http/modify/ranges.md#ranges), [Provide a file descriptor](transfers/callbacks/openclosesocket.md#provide-a-file-descriptor), [HTTP response code](libcurl-http/responses.md#http-response-code), [Ranges](libcurl-http/ranges.md#ranges) - --rate: [Request rate limiting](usingcurl/transfers/request-rate.md#request-rate-limiting) - Read callback: [make callbacks as fast as possible](libcurl/performance.md#make-callbacks-as-fast-as-possible), [All options](transfers/options/all.md#all-options), [Read data](transfers/callbacks/read.md#read-data), [HTTP POST](libcurl-http/upload.md#http-post) - redhat: [Redhat and CentOS](install/linux.md#redhat-and-centos) - - redirects: [Long options](cmdline/options.md#long-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [Syntax](cmdline/configfile.md#syntax), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Download to a file named by the URL](usingcurl/downloads/url-named.md#download-to-a-file-named-by-the-url), [Shell redirects](usingcurl/downloads/redirects.md#shell-redirects), [Provide a custom IP address for a name](usingcurl/connections/name.md#provide-a-custom-ip-address-for-a-name), [Captive portals](usingcurl/proxies/captive.md#captive-portals), [Redirects](http/redirects.md#redirects), [Request method](http/modify/method.md#request-method), [Redirects](http/browserlike.md#redirects), [All options](transfers/options/all.md#all-options), [Custom addresses for hosts](transfers/conn/names.md#custom-addresses-for-hosts), [Available information](transfers/getinfo.md#available-information), [Automatic referrer](libcurl-http/requests.md#automatic-referrer), [Submit a login form over HTTP](examples/login.md#submit-a-login-form-over-http) + - redirects: [Long options](cmdline/options/long.md#long-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [Syntax](cmdline/configfile.md#syntax), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Download to a file named by the URL](usingcurl/downloads/url-named.md#download-to-a-file-named-by-the-url), [Shell redirects](usingcurl/downloads/redirects.md#shell-redirects), [Provide a custom IP address for a name](usingcurl/connections/name.md#provide-a-custom-ip-address-for-a-name), [Captive portals](usingcurl/proxies/captive.md#captive-portals), [Redirects](http/redirects.md#redirects), [Request method](http/modify/method.md#request-method), [Redirects](http/browserlike.md#redirects), [All options](transfers/options/all.md#all-options), [Custom addresses for hosts](transfers/conn/names.md#custom-addresses-for-hosts), [Available information](transfers/getinfo.md#available-information), [Automatic referrer](libcurl-http/requests.md#automatic-referrer), [Submit a login form over HTTP](examples/login.md#submit-a-login-form-over-http) - RELEASE-NOTES: [scripts](source/layout.md#scripts) - releases: [curl-announce](project/maillists.md#curl-announce), [Releases](project/releases.md#releases), [scripts](source/layout.md#scripts), [Which libcurl version](libcurl/api.md#which-libcurl-version) - --remote-name-all: [One output for each given URL](cmdline/urls/options.md#one-output-for-each-given-url), [Use the URL's filename part for all URLs](usingcurl/downloads/url-named.md#use-the-urls-filename-part-for-all-urls) @@ -433,14 +433,14 @@ ## T - -T: [PUT](usingcurl/uploads.md#put), [Upload](usingcurl/tftp.md#upload), [Method](http/method.md#method), [HTTP PUT](http/put.md#http-put), [Uploading with FTP](ftp/upload.md#uploading-with-ftp) - - TCP: [Establish a connection](protocols/network.md#establish-a-connection), [How much do protocols change?](protocols/protocols.md#how-much-do-protocols-change), [DICT](protocols/curl.md#dict), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Connection reuse](cmdline/urls/connreuse.md#connection-reuse), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Connection timeout](usingcurl/connections/timeout.md#connection-timeout), [Local port number](usingcurl/connections/local-port.md#local-port-number), [Keep alive](usingcurl/connections/keepalive.md#keep-alive), [Timeouts](usingcurl/timeouts.md#timeouts), [HTTP proxy tunneling](usingcurl/proxies/http.md#http-proxy-tunneling), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [haproxy](usingcurl/proxies/haproxy.md#haproxy), [TLS](usingcurl/tls.md#tls), [Debugging with TELNET](usingcurl/telnet.md#debugging-with-telnet), [TFTP](usingcurl/tftp.md#tftp), [QUIC](http/versions/http3.md#quic), [HTTPS](http/https.md#https), [Two connections](ftp/twoconnections.md#two-connections), [Connection cache](libcurl/caches.md#connection-cache), [All options](transfers/options/all.md#all-options), [HTTP/3](transfers/conn/how.md#http-slash-3), [Keep alive](transfers/conn/keepalive.md#keep-alive), [connectdata](internals/structs.md#connectdata) + - TCP: [Establish a connection](protocols/network.md#establish-a-connection), [How much do protocols change?](protocols/protocols.md#how-much-do-protocols-change), [DICT](protocols/curl.md#dict), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Connection timeout](usingcurl/connections/timeout.md#connection-timeout), [Local port number](usingcurl/connections/local-port.md#local-port-number), [Keep alive](usingcurl/connections/keepalive.md#keep-alive), [Timeouts](usingcurl/timeouts.md#timeouts), [HTTP proxy tunneling](usingcurl/proxies/http.md#http-proxy-tunneling), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [haproxy](usingcurl/proxies/haproxy.md#haproxy), [TLS](usingcurl/tls.md#tls), [Debugging with TELNET](usingcurl/telnet.md#debugging-with-telnet), [TFTP](usingcurl/tftp.md#tftp), [QUIC](http/versions/http3.md#quic), [HTTPS](http/https.md#https), [Two connections](ftp/twoconnections.md#two-connections), [Connection cache](libcurl/caches.md#connection-cache), [All options](transfers/options/all.md#all-options), [HTTP/3](transfers/conn/how.md#http-slash-3), [Keep alive](transfers/conn/keepalive.md#keep-alive), [connectdata](internals/structs.md#connectdata) - TELNET: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [TELNET](protocols/curl.md#telnet), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Version](cmdline/curlver.md#version), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [TELNET](usingcurl/telnet.md#telnet), [All options](transfers/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables) - testing: [What does curl do?](project/does.md#what-does-curl-do), [Reporting bugs](project/bugs.md#reporting-bugs), [Handling build options](source/options.md#handling-build-options), [Contributing](source/contributing.md#contributing), [Run a local clone](source/web.md#run-a-local-clone), [Separate install](build/separate.md#separate-install), [About HTTP response code "errors"](libcurl-http/responses.md#about-http-response-code-errors), [Debug builds](internals/tests/debug.md#debug-builds), [Test servers](internals/tests/servers.md#test-servers), [Torture](internals/tests/torture.md#torture) - TFTP: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [TFTP](protocols/curl.md#tftp), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Version](cmdline/curlver.md#version), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [Protocols allowing upload](usingcurl/uploads.md#protocols-allowing-upload), [TFTP](usingcurl/tftp.md#tftp), [All options](transfers/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) - --tftp-blksize: [TFTP options](usingcurl/tftp.md#tftp-options) - --tftp-no-options: [TFTP options](usingcurl/tftp.md#tftp-options) - --time-cond: [Check by modification date](http/modify/conditionals.md#check-by-modification-date) - - TLS: [Security](protocols/network.md#security), [How much do protocols change?](protocols/protocols.md#how-much-do-protocols-change), [GOPHERS](protocols/curl.md#gophers), [The URL converted to a request](protocols/http.md#the-url-converted-to-a-request), [Ubuntu and Debian](install/linux.md#ubuntu-and-debian), [lib/vtls](source/layout.md#lib-slash-vtls), [Handling build options](source/options.md#handling-build-options), [Select TLS backend](build/autotools.md#select-tls-backend), [TLS libraries](build/deps.md#tls-libraries), [TLS libraries](build/tls.md#tls-libraries), [Connection reuse](cmdline/urls/connreuse.md#connection-reuse), [Line 1: curl](cmdline/curlver.md#line-1-curl), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [More data](usingcurl/verbose/trace.md#more-data), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Change the Host: header](usingcurl/connections/name.md#change-the-host-header), [Never spend more than this to connect](usingcurl/timeouts.md#never-spend-more-than-this-to-connect), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [TLS](usingcurl/tls.md#tls), [Ciphers](usingcurl/tls/ciphers.md#ciphers), [Enable TLS](usingcurl/tls/enable.md#enable-tls), [TLS versions](usingcurl/tls/versions.md#tls-versions), [Verifying server certificates](usingcurl/tls/verify.md#verifying-server-certificates), [Certificate pinning](usingcurl/tls/pinning.md#certificate-pinning), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Client certificates](usingcurl/tls/clientcert.md#client-certificates), [TLS auth](usingcurl/tls/auth.md#tls-auth), [TLS backends](usingcurl/tls/backends.md#tls-backends), [SSLKEYLOGFILE](usingcurl/tls/sslkeylogfile.md#sslkeylogfile), [Known hosts](usingcurl/ssh/knownhosts.md#known-hosts), [TLS for emails](usingcurl/reademail.md#tls-for-emails), [Caveats](usingcurl/mqtt.md#caveats), [HTTPS only](http/versions/http3.md#https-only), [Figure out what a browser sends](http/post/browsersends.md#figure-out-what-a-browser-sends), [HTTPS](http/https.md#https), [TLS fingerprinting](http/browserlike.md#tls-fingerprinting), [FTPS](ftp/ftps.md#ftps), [Trace everything](libcurl/verbose.md#trace-everything), [Caches](libcurl/caches.md#caches), [reuse handles](libcurl/performance.md#reuse-handles), [TLS options](transfers/options/tls.md#tls-options), [All options](transfers/options/all.md#all-options), [SSL context](transfers/callbacks/sslcontext.md#ssl-context), [HTTP proxy](transfers/conn/proxies.md#http-proxy), [Authentication](transfers/auth.md#authentication), [Available information](transfers/getinfo.md#available-information), [URLs](helpers/ws/urls.md#urls), [Different backends](internals/backends.md#different-backends), [connection cache](internals/caches.md#connection-cache), [Variables](internals/tests/file-format.md#variables) + - TLS: [Security](protocols/network.md#security), [How much do protocols change?](protocols/protocols.md#how-much-do-protocols-change), [GOPHERS](protocols/curl.md#gophers), [The URL converted to a request](protocols/http.md#the-url-converted-to-a-request), [Ubuntu and Debian](install/linux.md#ubuntu-and-debian), [lib/vtls](source/layout.md#lib-slash-vtls), [Handling build options](source/options.md#handling-build-options), [Select TLS backend](build/autotools.md#select-tls-backend), [TLS libraries](build/deps.md#tls-libraries), [TLS libraries](build/tls.md#tls-libraries), [Line 1: curl](cmdline/curlver.md#line-1-curl), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [More data](usingcurl/verbose/trace.md#more-data), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Change the Host: header](usingcurl/connections/name.md#change-the-host-header), [Never spend more than this to connect](usingcurl/timeouts.md#never-spend-more-than-this-to-connect), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [TLS](usingcurl/tls.md#tls), [Ciphers](usingcurl/tls/ciphers.md#ciphers), [Enable TLS](usingcurl/tls/enable.md#enable-tls), [TLS versions](usingcurl/tls/versions.md#tls-versions), [Verifying server certificates](usingcurl/tls/verify.md#verifying-server-certificates), [Certificate pinning](usingcurl/tls/pinning.md#certificate-pinning), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Client certificates](usingcurl/tls/clientcert.md#client-certificates), [TLS auth](usingcurl/tls/auth.md#tls-auth), [TLS backends](usingcurl/tls/backends.md#tls-backends), [SSLKEYLOGFILE](usingcurl/tls/sslkeylogfile.md#sslkeylogfile), [Known hosts](usingcurl/ssh/knownhosts.md#known-hosts), [TLS for emails](usingcurl/reademail.md#tls-for-emails), [Caveats](usingcurl/mqtt.md#caveats), [HTTPS only](http/versions/http3.md#https-only), [Figure out what a browser sends](http/post/browsersends.md#figure-out-what-a-browser-sends), [HTTPS](http/https.md#https), [TLS fingerprinting](http/browserlike.md#tls-fingerprinting), [FTPS](ftp/ftps.md#ftps), [Trace everything](libcurl/verbose.md#trace-everything), [Caches](libcurl/caches.md#caches), [reuse handles](libcurl/performance.md#reuse-handles), [TLS options](transfers/options/tls.md#tls-options), [All options](transfers/options/all.md#all-options), [SSL context](transfers/callbacks/sslcontext.md#ssl-context), [HTTP proxy](transfers/conn/proxies.md#http-proxy), [Authentication](transfers/auth.md#authentication), [Available information](transfers/getinfo.md#available-information), [URLs](helpers/ws/urls.md#urls), [Different backends](internals/backends.md#different-backends), [connection cache](internals/caches.md#connection-cache), [Variables](internals/tests/file-format.md#variables) - TLS backend: [Ubuntu and Debian](install/linux.md#ubuntu-and-debian), [lib/vtls](source/layout.md#lib-slash-vtls), [Select TLS backend](build/autotools.md#select-tls-backend), [Line 1: curl](cmdline/curlver.md#line-1-curl), [Available exit codes](cmdline/exitcode.md#available-exit-codes), [TLS](usingcurl/tls.md#tls), [Native CA stores](usingcurl/tls/verify.md#native-ca-stores), [Certificate pinning](usingcurl/tls/pinning.md#certificate-pinning), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Client certificates](usingcurl/tls/clientcert.md#client-certificates), [TLS backends](usingcurl/tls/backends.md#tls-backends), [CA cert cache](libcurl/caches.md#ca-cert-cache), [SSL context](transfers/callbacks/sslcontext.md#ssl-context) - TODO: [Future](project/future.md#future), [Suggestions](source/contributing.md#suggestions) - --tr-encoding: [Transfer encoding](http/response.md#transfer-encoding), [Compression](http/modify/compression.md#compression) @@ -457,15 +457,15 @@ - -U: [Building libcurl on MSYS2](install/windows/win-msys2.md#building-libcurl-on-msys2), [Proxy authentication](usingcurl/proxies/auth.md#proxy-authentication) - -u: [Building libcurl on MSYS2](install/windows/win-msys2.md#building-libcurl-on-msys2), [Passwords](cmdline/passwords.md#passwords), [URLs](usingcurl/ssh/url.md#urls), [Authentication](usingcurl/ssh/auth.md#authentication), [IMAP](usingcurl/reademail.md#imap), [Authentication](http/auth.md#authentication) - Ubuntu: [Ubuntu and Debian](install/linux.md#ubuntu-and-debian) - - URL Globbing: [URL globbing](cmdline/globbing.md#url-globbing) + - URL Globbing: [URL globbing](cmdline/urls/globbing.md#url-globbing) - URL parser: [Browsers](cmdline/urls/browsers.md#browsers), [trurl](cmdline/urls/trurl.md#trurl), [`CURLU_ALLOW_SPACE`](helpers/url/parse.md#curlu_allow_space) - --url-query: [Query](cmdline/urls/query.md#query) ## V - --variable: [Variables](cmdline/variables.md#variables) - - variables: [No assignments in conditions](source/style.md#no-assignments-in-conditions), [Output variables for globbing](cmdline/globbing.md#output-variables-for-globbing), [Config file](cmdline/configfile.md#config-file), [Variables](cmdline/variables.md#variables), [Error message](cmdline/exitcode.md#error-message), [Write out](usingcurl/verbose/writeout.md#write-out), [Proxy environment variables](usingcurl/proxies/env.md#proxy-environment-variables), [Ciphers](usingcurl/tls/ciphers.md#ciphers), [Proxy environment variables](transfers/conn/proxies.md#proxy-environment-variables), [Preprocessed](internals/tests/file-format.md#preprocessed) - - --verbose: [Long options](cmdline/options.md#long-options), [Time stamps](usingcurl/verbose/trace.md#time-stamps) + - variables: [No assignments in conditions](source/style.md#no-assignments-in-conditions), [Output variables for globbing](cmdline/urls/globbing.md#output-variables-for-globbing), [Config file](cmdline/configfile.md#config-file), [Variables](cmdline/variables.md#variables), [Error message](cmdline/exitcode.md#error-message), [Write out](usingcurl/verbose/writeout.md#write-out), [Proxy environment variables](usingcurl/proxies/env.md#proxy-environment-variables), [Ciphers](usingcurl/tls/ciphers.md#ciphers), [Proxy environment variables](transfers/conn/proxies.md#proxy-environment-variables), [Preprocessed](internals/tests/file-format.md#preprocessed) + - --verbose: [Long options](cmdline/options/long.md#long-options), [Time stamps](usingcurl/verbose/trace.md#time-stamps) - --version: [Version](cmdline/curlver.md#version), [TLS backends](usingcurl/tls/backends.md#tls-backends), [Memory debugging](internals/memory-debugging.md#memory-debugging) - Vulnerability: [Vulnerability handling](source/reportvuln.md#vulnerability-handling) diff --git a/cmdline/README.md b/cmdline/README.md index 3312e7e5c8..6c396c6ef7 100644 --- a/cmdline/README.md +++ b/cmdline/README.md @@ -17,16 +17,14 @@ protocol communications and you can have curl massage your server implementations in the most creative ways. * [Differences](differences.md) - * [Command line options](options.md) + * [Command line options](options/) * [Options depend on version](versions.md) * [URLs](urls/) - * [URL globbing](globbing.md) * [List options](listopts.md) * [Config file](configfile.md) * [Variables](variables.md) * [Passwords](passwords.md) * [Progress meter](progressmeter.md) * [Version](curlver.md) - * [Persistent connections](persist.md) * [Exit code](exitcode.md) * [Copy as curl](copyas.md) diff --git a/cmdline/options.md b/cmdline/options/README.md similarity index 100% rename from cmdline/options.md rename to cmdline/options/README.md diff --git a/cmdline/options/args.md b/cmdline/options/args.md new file mode 100644 index 0000000000..9343d1232d --- /dev/null +++ b/cmdline/options/args.md @@ -0,0 +1,51 @@ +# Arguments to options + +Not all options are just simple boolean flags that enable or disable +features. For some of them you need to pass on data, like perhaps a username +or a path to a file. You do this by writing first the option and then the +argument, separated with a space. Like, for example, if you want to send an +arbitrary string of data in an HTTP POST to a server: + + curl -d arbitrary http://example.com + +and it works the same way even if you use the long form of the option: + + curl --data arbitrary http://example.com + +When you use the short options with arguments, you can, in fact, also write the +data without the space separator: + + curl -darbitrary http://example.com + +## Arguments with spaces + +At times you want to pass on an argument to an option, and that argument +contains one or more spaces. For example you want to set the user-agent field +curl uses to be exactly `I am your father`, including those three spaces. Then +you need to put quotes around the string when you pass it to curl on the +command line. The exact quotes to use varies depending on your shell/command +prompt, but generally it works with double quotes in most places: + + curl -A "I am your father" http://example.com + +Failing to use quotes, like if you would write the command line like this: + + curl -A I am your father http://example.com + +… makes curl only use 'I' as a user-agent string, and the following strings, +`am`, `your` and `father` are instead treated as separate URLs since they do +not start with `-` to indicate that they are options and curl only ever +handles options and URLs. + +To make the string itself contain double quotes, which is common when you for +example want to send a string of JSON to the server, you may need to use +single quotes (except on Windows, where single quotes do not work the same +way). Send the JSON string `{ "name": "Darth" }`: + + curl -d '{ "name": "Darth" }' http://example.com + +Or if you want to avoid the single quote thing, you may prefer to send the +data to curl via a file, which then does not need the extra quoting. Assuming +we call the file 'json' that contains the above mentioned data: + + curl -d @json http://example.com diff --git a/cmdline/options/long.md b/cmdline/options/long.md new file mode 100644 index 0000000000..ce468cbdba --- /dev/null +++ b/cmdline/options/long.md @@ -0,0 +1,19 @@ +# Long options + +Single-letter options are convenient since they are quick to write and use, but +as there are only a limited number of letters in the alphabet and there are +many things to control, not all options are available like that. Long option +names are therefore provided for those. Also, as a convenience and to allow +scripts to become more readable, most short options have longer name +aliases. + +Long options are always written with *two* minuses (or *dashes*, whichever you +prefer to call them) and then the name and you can only write one option name +per double-minus. Asking for verbose mode using the long option format looks +like: + + curl --verbose http://example.com + +and asking for HTTP redirects as well using the long format looks like: + + curl --verbose --location http://example.com diff --git a/cmdline/options/negative.md b/cmdline/options/negative.md new file mode 100644 index 0000000000..0b89dba959 --- /dev/null +++ b/cmdline/options/negative.md @@ -0,0 +1,7 @@ +# Negative options + +For options that switch on something, boolean options, there is also a way to +switch them off. You then use the long form of the option with an initial +`no-` prefix before the name. As an example, to switch off verbose mode: + + curl --no-verbose http://example.com diff --git a/cmdline/options/short.md b/cmdline/options/short.md new file mode 100644 index 0000000000..bc03dcac8d --- /dev/null +++ b/cmdline/options/short.md @@ -0,0 +1,25 @@ +# Short options + +Command line options pass on information to curl about how you want it to +behave. Like you can ask curl to switch on verbose mode with the -v option: + + curl -v http://example.com + +-v is here used as a "short option". You write those with the minus symbol and +a single letter immediately following it. Many options are just switches that +switch something on or change something between two known states. They can +be used with just that option name. You can then also combine several +single-letter options after the minus. To ask for both verbose mode and that +curl follows HTTP redirects: + + curl -vL http://example.com + +The command-line parser in curl always parses the entire line and you can put +the options anywhere you like; they can also appear after the URL: + + curl http://example.com -Lv + +and the two separate short options can of course also be specified separately, +like: + + curl -v -L http://example.com diff --git a/cmdline/persist.md b/cmdline/persist.md deleted file mode 100644 index b5d2d89952..0000000000 --- a/cmdline/persist.md +++ /dev/null @@ -1,21 +0,0 @@ -# Persistent connections - -When setting up connections to sites, curl keeps old connections around for a -while so that if the next transfer is done using the same host as a previous -transfer, it can reuse the same connection again and thus save a lot of -time. We call this persistent connections. curl always tries to keep -connections alive and reuses existing connections as far as it can. - -Connections are kept in the *connection pool*, sometimes also called the -*connection cache*. - -The curl command-line tool can, however, only keep connections alive for as -long as it runs, so as soon as it exits back to your command line it has to -close down all currently open connections (and also free and clean up all the -other caches it uses to decrease time of subsequent operations). We call the -pool of alive connections the *connection cache*. - -If you want to perform N transfers or operations against the same host or same -base URL, you could gain a lot of speed by trying to do them in as few curl -command lines as possible instead of repeatedly invoking curl with one URL at -a time. diff --git a/cmdline/urls/README.md b/cmdline/urls/README.md index b341c1818a..b8303e7481 100644 --- a/cmdline/urls/README.md +++ b/cmdline/urls/README.md @@ -23,6 +23,7 @@ describes how that particular URI format works. * [Fragment](fragment.md) * [Browsers](browsers.md) * [Many options and URLs](options.md) +* [URL globbing](globbing.md) * [Connection reuse](connreuse.md) * [Parallel transfers](parallel.md) * [trurl](trurl.md) diff --git a/cmdline/urls/connreuse.md b/cmdline/urls/connreuse.md index ca2abd6a99..6d8c0a7bd9 100644 --- a/cmdline/urls/connreuse.md +++ b/cmdline/urls/connreuse.md @@ -1,14 +1,21 @@ # Connection reuse -Setting up a TCP connection and especially a TLS connection can be a slow -process, even on high bandwidth networks. - -It can be useful to remember that curl has a connection pool internally which -keeps previously used connections alive and around for a while after they were -used so that subsequent requests to the same hosts can reuse an already -established connection. - -Of course, they can only be kept alive for as long as the curl tool is -running. It is a good reason for trying to get several transfers done -within the same command line instead of running several independent curl -command line invocations. +When setting up connections to sites, curl keeps old connections around for a +while so that if the next transfer is done using the same host as a previous +transfer, it can reuse the same connection again and thus save a lot of +time. We call this persistent connections. curl always tries to keep +connections alive and reuses existing connections as far as it can. + +Connections are kept in the *connection pool*, sometimes also called the +*connection cache*. + +The curl command-line tool can, however, only keep connections alive for as +long as it runs, so as soon as it exits back to your command line it has to +close down all currently open connections (and also free and clean up all the +other caches it uses to decrease time of subsequent operations). We call the +pool of alive connections the *connection cache*. + +If you want to perform N transfers or operations against the same host or same +base URL, you could gain a lot of speed by trying to do them in as few curl +command lines as possible instead of repeatedly invoking curl with one URL at +a time. diff --git a/cmdline/globbing.md b/cmdline/urls/globbing.md similarity index 100% rename from cmdline/globbing.md rename to cmdline/urls/globbing.md diff --git a/ftp/upload.md b/ftp/upload.md index 9087284138..03ed408c90 100644 --- a/ftp/upload.md +++ b/ftp/upload.md @@ -19,8 +19,8 @@ overwriting, with the `--append` option: curl -T uploadthis --append ftp://example.com/directory/remotename -curl also supports [globbing](../cmdline/globbing.md) in the `-T` argument so -you can opt to easily upload a range of files: +curl also supports [globbing](../cmdline/urls/globbing.md) in the `-T` +argument so you can opt to easily upload a range of files: curl -T 'image[1-99].jpg' ftp://ftp.example.com/upload/