# `--abstract-unix-socket`
-Connect through an abstract Unix domain socket, instead of using the network.
-Note: netstat shows the path of an abstract socket prefixed with `@`, however
-the \<path\> argument should not have this leading character.
+Connect to the server through an abstract Unix domain socket, instead of using
+the network. Note: netstat shows the path of an abstract socket prefixed with
+`@`, however the \<path\> argument should not have this leading character.
# `--compressed-ssh`
Enable SSH compression. This is a request, not an order; the server may or may
-not do it.
+not do it. This allows the data to be sent compressed over the wire, and
+automatically decompressed in the receiving end, to save bandwidth.
Exit with error if passed a URL containing a username. Probably most useful
when the URL is being provided at runtime or similar.
+
+Accepting and using credentials in a URL is normally considered a security
+hazard as they are easily leaked that way.
# `--engine`
-Select the OpenSSL crypto engine to use for cipher operations. Use --engine
-list to print a list of build-time supported engines. Note that not all (and
+Select the OpenSSL crypto engine to use for cipher operations. Use `--engine
+list` to print a list of build-time supported engines. Note that not all (and
possibly none) of the engines may be available at runtime.
+
+The OpenSSL concept "engines" has been superseded by "providers" in OpenSSL 3,
+and this option should work fine to specify such as well.
See-also:
- request
- location
+ - proto-redir
+ - max-redirs
Example:
- -X POST --follow $URL
---
This is subtly different than --location, as that option always set the custom
method in all subsequent requests independent of response code.
+
+Restrict which protocols a redirect is accepted to follow with --proto-redir.
specify URLs that contain the letters {}[] without having curl itself
interpret them. Note that these letters are not normal legal URL contents but
they should be encoded according to the URI standard.
+
+curl detects numerical IPv6 addresses when used in URLs and excludes them from
+the treatment, so they can still be used without having to disable globbing.
- http1.1
- http3
- no-alpn
+ - proxy-http2
Example:
- --http2 $URL
---
regular negotiation between HTTP/1 and HTTP/2.
Use --http3-only for similar functionality *without* a fallback.
+
+curl cannot do HTTP/3 over any proxy.
# `--junk-session-cookies`
When curl is told to read cookies from a given file, this option makes it
-discard all "session cookies". This has the same effect as if a new session is
+discard all session cookies. This has the same effect as if a new session is
started. Typical browsers discard session cookies when they are closed down.
+
+Session cookies are cookies without a set expiry time. They are meant to only
+last for "a session".
- resolve
- alt-svc
- follow
+ - proto-redir
+ - max-redirs
Example:
- -L $URL
---
The method set with --request overrides the method curl would otherwise select
to use.
+
+Restrict which protocols a redirect is accepted to follow with --proto-redir.
Multi: single
See-also:
- location
+ - follow
Example:
- --max-redirs 3 --location $URL
---
# `--max-redirs`
-Set the maximum number of redirections to follow. When --location is used, to
-prevent curl from following too many redirects, by default, the limit is
-set to 50 redirects. Set this option to -1 to make it unlimited.
+Set the maximum number of redirections to follow. When --location or --follow
+are used, this option prevents curl from following too many redirects. By
+default the limit is set to 50 redirects. Set this option to -1 to make it
+unlimited.
Multi: single
See-also:
- proto
+ - follow
Example:
- - --proto-redir =http,https $URL
+ - --proto-redir =http,https --follow $URL
---
# `--proto-redir`
Example, allow only HTTP and HTTPS on redirect:
- curl --proto-redir -all,http,https http://example.com
+ curl --proto-redir -all,http,https --follow http://example.com
By default curl only allows HTTP, HTTPS, FTP and FTPS on redirects
(added in 7.65.2). Specifying *all* or *+all* enables all protocols on
GnuTLS (added in 7.52.0). It also works for mbedTLS, Rustls, Schannel and
wolfSSL (added in 7.87.0).
-Unrecognized and unsupported proxy protocols cause an error (added in 7.52.0).
-Ancient curl versions ignored unknown schemes and used http:// instead.
+Unrecognized and unsupported proxy protocol schemes cause an error.
If the port number is not specified in the proxy string, it is assumed to be
1080.
Multi: single
See-also:
- request-target
+ - follow
Example:
- - -X "DELETE" $URL
+ - --request "DELETE" $URL
- -X NLST ftp://example.com/
---
alter the way curl behaves. For example if you want to make a proper HEAD
request, using -X HEAD does not suffice. You need to use the --head option.
-The method string you set with --request is used for all requests, which
-if you for example use --location may cause unintended side-effects when curl
-does not change request method according to the HTTP 30x response codes - and
-similar.
+If --location is used, the method string you set with --request is used for
+all requests, which may cause unintended side-effects when curl does not
+change request method according to the HTTP 30x response codes - and similar.
+Consider using --follow instead in combination with --request.
## FTP
Specifies a custom FTP command to use instead of *LIST* when doing file lists
# `--retry-connrefused`
-In addition to the other conditions, consider ECONNREFUSED as a transient
-error too for --retry. This option is used together with --retry.
+In addition to the other conditions, also consider ECONNREFUSED as a transient
+error for --retry. This option is used together with --retry. Normally, a
+confused connection is not considered a transient error and therefore thus not
+otherwise trigger a retry.
Multi: single
See-also:
- retry-max-time
+ - retry-connrefused
+ - retry-delay
Example:
- --retry 7 $URL
---
# `--retry`
If a transient error is returned when curl tries to perform a transfer, it
-retries this number of times before giving up. Setting the number to 0
-makes curl do no retries (which is the default). Transient error means either:
-a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
+retries this number of times before giving up. Setting the number to 0 makes
+curl do no retries (which is the default). Transient error means either: a
+timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
response code.
When curl is about to retry a transfer, it first waits one second and then for
all forthcoming retries it doubles the waiting time until it reaches 10
minutes, which then remains the set fixed delay time between the rest of the
-retries. By using --retry-delay you disable this exponential backoff algorithm.
-See also --retry-max-time to limit the total time allowed for retries.
+retries. By using --retry-delay you disable this exponential backoff
+algorithm. See also --retry-max-time to limit the total time allowed for
+retries.
curl complies with the Retry-After: response header if one was present to know
when to issue the next retry (added in 7.66.0).
# `--sasl-ir`
-Enable initial response in SASL authentication.
+Enable initial response in SASL authentication. Such an "initial response" is
+a message sent by the client to the server after the client selects an
+authentication mechanism.
Request a compressed Transfer-Encoding response using one of the algorithms
curl supports, and uncompress the data while receiving it.
+
+This method was once intended to be the way to do automatic data compression
+for HTTP but for all practical purposes using Content-Encoding as done with
+--compressed has superseded transfer encoding. The --tr-encoding option is
+therefore often not be one you want.
Prepend the transfer and connection identifiers to each trace or verbose line
that curl displays.
+
+The identifiers are unique numbers assigned to each connection and transfer to
+allow a user to better understand which transfer and connection each verbose
+output line refers to.
# `--unix-socket`
-Connect through this Unix domain socket, instead of using the network.
+Connect to the server through this Unix domain socket, instead of using the
+network.
+
+To connect to a proxy over Unix domain socket, see --proxy.