diff --git a/SUMMARY.md b/SUMMARY.md index 29d01c539c..bae9fc4e4f 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -296,7 +296,7 @@ * [Memory debugging](internals/memory-debugging.md) * [Content Encoding](internals/content-encoding.md) * [Structs](internals/structs.md) - * [Resolving host names](internals/resolving.md) + * [Resolving hostnames](internals/resolving.md) * [Tests](internals/tests/README.md) * [Test file format](internals/tests/file-format.md) * [Build tests](internals/tests/build.md) diff --git a/cmdline/exitcode.md b/cmdline/exitcode.md index b67185e1bf..329f7bb4a2 100644 --- a/cmdline/exitcode.md +++ b/cmdline/exitcode.md @@ -319,7 +319,7 @@ A basic Unix shell script could look like something like this: 66. Failed to initialize the OpenSSL SSL Engine. This can only happen when OpenSSL is used and would signify a serious internal problem. - 67. The user name, password, or similar was not accepted and curl failed to + 67. The username, password, or similar was not accepted and curl failed to log in. Verify that the credentials are provided correctly and that they are encoded the right way. diff --git a/cmdline/options.md b/cmdline/options.md index 2dea0acfa9..c3f9ed93de 100644 --- a/cmdline/options.md +++ b/cmdline/options.md @@ -53,7 +53,7 @@ and asking for HTTP redirects as well using the long format looks like: ## 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 user name +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: diff --git a/cmdline/passwords.md b/cmdline/passwords.md index c2b2ea8565..6a05e33abc 100644 --- a/cmdline/passwords.md +++ b/cmdline/passwords.md @@ -7,9 +7,9 @@ curl offers several ways to receive passwords from the user and then subsequently pass them on or use them to something else. The most basic curl authentication option is `-u / --user`. It accepts an -argument that is the user name and password, colon separated. Like when -`alice` wants to request a page requiring HTTP authentication and her password -is `12345`: +argument that is the username and password, colon separated. Like when `alice` +wants to request a page requiring HTTP authentication and her password is +`12345`: $ curl -u alice:12345 http://example.com/ @@ -20,7 +20,7 @@ password on the command line and the command line might be readable for other users on the same system (assuming you have a multi-user system). curl helps minimize that risk by trying to blank out passwords from process listings. -One way to avoid passing the user name and password on the command line is to +One way to avoid passing the username and password on the command line is to instead use a [.netrc file](../usingcurl/netrc.md) or a [config file](configfile.md). You can also use the `-u` option without specifying the password, and then curl instead prompts the user for it when it runs. diff --git a/cmdline/urls/auth.md b/cmdline/urls/auth.md index c606916d1d..43528701ea 100644 --- a/cmdline/urls/auth.md +++ b/cmdline/urls/auth.md @@ -1,16 +1,16 @@ # Name and password -Following the scheme in a URL, there can be a possible user name and password +Following the scheme in a URL, there can be a possible username and password field embedded. The use of this syntax is usually frowned upon these days since you easily leak this information in scripts or otherwise. For example, listing the directory of an FTP server using a given name and password: curl ftp://user:password@example.com/ -The presence of user name and password in the URL is completely optional. curl +The presence of username and password in the URL is completely optional. curl also allows that information to be provided with normal command-line options, outside of the URL. -If you want a non-ASCII letter or maybe a `:` or `@` as part of the user name +If you want a non-ASCII letter or maybe a `:` or `@` as part of the username and/or password, remember to URL encode that letter: write it as `%HH` where `HH` is the hexadecimal byte value. `:` is `%3a` and `@` is `%40`. diff --git a/helpers/sharing.md b/helpers/sharing.md index 1c8e99175a..80ba375e23 100644 --- a/helpers/sharing.md +++ b/helpers/sharing.md @@ -43,7 +43,7 @@ easy handle still needs to get its cookie "engine" started properly to start using cookies. `CURL_LOCK_DATA_DNS` - the DNS cache is where libcurl stores addresses for -resolved host names for a while to make subsequent lookups faster. +resolved hostnames for a while to make subsequent lookups faster. `CURL_LOCK_DATA_SSL_SESSION` - the SSL session ID cache is where libcurl store resume information for SSL connections to be able to resume a previous diff --git a/helpers/url/get.md b/helpers/url/get.md index a7d719c596..88f81869a5 100644 --- a/helpers/url/get.md +++ b/helpers/url/get.md @@ -39,12 +39,12 @@ include the port number. ## `CURLU_URLENCODE` This flag makes `curl_url_get()` URL encode the hostname part when a full URL -is retrieved. If not set (default), libcurl returns the URL with the host name -"raw" to support IDN names to appear as-is. IDN host names are typically using +is retrieved. If not set (default), libcurl returns the URL with the hostname +"raw" to support IDN names to appear as-is. IDN hostnames are typically using non-ASCII bytes that otherwise are percent-encoded. Note that even when not asking for URL encoding, the `%` (byte 37) is URL -encoded in host names to make sure the hostname remains valid. +encoded in hostnames to make sure the hostname remains valid. ## `CURLU_URLDECODE` diff --git a/how-to-read.md b/how-to-read.md index 60bb312027..5da584b7c0 100644 --- a/how-to-read.md +++ b/how-to-read.md @@ -57,8 +57,8 @@ A closer look at doing and controlling HTTP specific transfers with libcurl. ## 13. [libcurl helpers](helpers/README.md) libcurl provides a set of additional APIs, helpers, that go a little beyond -just transfers. These are APIs and subsystems that can make your libcurl -using application excel. Manage URLs, extract HTTP headers and more. +just transfers. These are APIs and subsystems that can make your libcurl using +application excel. Manage URLs, extract HTTP headers and more. ## 14. [libcurl examples](examples/README.md) diff --git a/http/auth.md b/http/auth.md index 197be12b67..677f854108 100644 --- a/http/auth.md +++ b/http/auth.md @@ -20,7 +20,7 @@ and then the browser issues a POST with the user and password etc, and then subsequently maintain cookies for the session. To tell curl to do an authenticated HTTP request, you use the `-u, --user` -option to provide user name and password (separated with a colon). Like this: +option to provide username and password (separated with a colon). Like this: curl --user daniel:secret http://example.com/ @@ -28,7 +28,7 @@ This makes curl use the default *Basic* HTTP authentication method. Yes, it is actually called Basic and it is truly basic. To explicitly ask for the basic method, use `--basic`. -The Basic authentication method sends the user name and password in clear text +The Basic authentication method sends the username and password in clear text over the network (base64 encoded) and should be avoided for HTTP transport. When asking to do an HTTP transfer using a single (specified or implied), diff --git a/http/browserlike.md b/http/browserlike.md index ad99543ab3..2d7187e5ac 100644 --- a/http/browserlike.md +++ b/http/browserlike.md @@ -33,7 +33,7 @@ the verbatim request. ## Cookies -A lot of the web today works with a user name and password login prompt +A lot of the web today works with a username and password login prompt somewhere. In many cases you even logged in a while ago with your browser but it has kept the state and keeps you logged in. diff --git a/http/redirects.md b/http/redirects.md index d94efa1b8b..9848209a58 100644 --- a/http/redirects.md +++ b/http/redirects.md @@ -100,17 +100,17 @@ response by using the dedicated options for that: `--post301`, `--post302` and `--post303`. If you are instead writing a libcurl based application, you control that behavior with the `CURLOPT_POSTREDIR` option. -## Redirecting to other host names +## Redirecting to other hostnames -When you use curl you may provide credentials like user name and password for +When you use curl you may provide credentials like username and password for a particular site, but since an HTTP redirect might move away to a different host curl limits what it sends away to other hosts than the original within the same transfer. -So if you want the credentials to also get sent to the following host names -even though they are not the same as the original—presumably because you -trust them and know that there is no harm in doing that—you can tell curl that -it is fine to do so by using the `--location-trusted` option. +So if you want the credentials to also get sent to the following hostnames +even though they are not the same as the original—presumably because you trust +them and know that there is no harm in doing that—you can tell curl that it is +fine to do so by using the `--location-trusted` option. # Non-HTTP redirects diff --git a/internals/caches.md b/internals/caches.md index a514b34d5c..4cc9557d8c 100644 --- a/internals/caches.md +++ b/internals/caches.md @@ -48,7 +48,7 @@ disk as well. ## Alt-Svc `Alt-Svc:` is an HTTP response header that informs the client about -alternative host names, port numbers and protocol versions where the same +alternative hostnames, port numbers and protocol versions where the same service is also available. curl keeps this alternative service information in memory and can be told to load it from and save it to disk as well. diff --git a/internals/resolving.md b/internals/resolving.md index 4eaa459496..3eb059d4a0 100644 --- a/internals/resolving.md +++ b/internals/resolving.md @@ -1,4 +1,4 @@ -# Resolving host names +# Resolving hostnames Aka `hostip.c` explained diff --git a/libcurl-http/auth.md b/libcurl-http/auth.md index 5db790b2ca..63f7e1347f 100644 --- a/libcurl-http/auth.md +++ b/libcurl-http/auth.md @@ -7,9 +7,9 @@ used scheme on the web today where authentication is performed by an HTTP POST and then keeping state in cookies. See [Cookies with libcurl](cookies.md) for details on how to do that. -## User name and password +## Username and password -libcurl does not try any HTTP authentication without a given user name. Set +libcurl does not try any HTTP authentication without a given username. Set one like: curl_easy_setopt(curl, CURLOPT_USERNAME, "joe"); @@ -58,7 +58,7 @@ plain text. This is however an authentication method that is rarely spoken by browsers and consequently is not a frequently used one. You can explicitly tell libcurl to use the Digest method for a specific -transfer like this (it still needs user name and password set as well): +transfer like this (it still needs username and password set as well): curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); @@ -67,7 +67,7 @@ transfer like this (it still needs user name and password set as well): Another HTTP authentication method is called NTLM. You can explicitly tell libcurl to use the NTLM method for a specific transfer -like this (it still needs user name and password set as well): +like this (it still needs username and password set as well): curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); @@ -76,7 +76,7 @@ like this (it still needs user name and password set as well): Another HTTP authentication method is called Negotiate. You can explicitly tell libcurl to use the Negotiate method for a specific -transfer like this (it still needs user name and password set as well): +transfer like this (it still needs username and password set as well): curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE); diff --git a/libcurl/caches.md b/libcurl/caches.md index 0137dcb2aa..4e6169ae69 100644 --- a/libcurl/caches.md +++ b/libcurl/caches.md @@ -38,8 +38,8 @@ A reused connection usually saves having to a DNS lookup, setting up a TCP connection, do a TLS handshake and more. Connections are only reused if the name is identical. Even if two different -host names resolve to the same IP addresses, they still always use two -separate connections with libcurl. +hostnames resolve to the same IP addresses, they still always use two separate +connections with libcurl. Since the connection reuse is based on the hostname and the DNS resolve phase is entirely skipped when a connection is reused for a transfer, libcurl does @@ -58,7 +58,7 @@ TLS session IDs and tickets are special TLS mechanisms that a client can pass to a server to shortcut subsequent TLS handshakes to a server it previously established a connection to. -libcurl caches session IDs and tickets associated with host names and port +libcurl caches session IDs and tickets associated with hostnames and port numbers, so if a subsequent connection attempt is made to a host for which libcurl has a cached ID or ticket, using that can greatly decrease the TLS handshake process and therefore the time needed until completion. diff --git a/transfers/conn/names.md b/transfers/conn/names.md index e9d5c01090..ca6a3728cb 100644 --- a/transfers/conn/names.md +++ b/transfers/conn/names.md @@ -71,7 +71,7 @@ made shared between multiple easy handles using the ## Custom addresses for hosts -Sometimes it is handy to provide fake, custom addresses for real host names so +Sometimes it is handy to provide fake, custom addresses for real hostnames so that libcurl connects to a different address instead of one an actual name resolve would suggest. diff --git a/transfers/conn/proxies.md b/transfers/conn/proxies.md index 8b2134448d..3264a9f314 100644 --- a/transfers/conn/proxies.md +++ b/transfers/conn/proxies.md @@ -96,11 +96,11 @@ exists. If a specific protocol variable one exists, such a one takes precedence. When using environment variables to set a proxy, you could easily end up in a -situation where one or a few host names should be excluded from going through +situation where one or a few hostnames should be excluded from going through the proxy. This can be done with the `NO_PROXY` variable - or the corresponding `CURLOPT_NOPROXY` libcurl option. Set that to a comma-separated -list of host names that should not use a proxy when being accessed. You can -set NO_PROXY to be a single asterisk ('\*') to match all hosts. +list of hostnames that should not use a proxy when being accessed. You can set +NO_PROXY to be a single asterisk ('\*') to match all hosts. ## HTTP proxy @@ -144,7 +144,7 @@ is then in addition to and separate of the possible authentication or lack of authentication with the remote host. libcurl supports authentication with HTTP, HTTPS and SOCKS5 proxies. The key -option is then `CURLOPT_PROXYUSERPWD` which sets the user name and password to +option is then `CURLOPT_PROXYUSERPWD` which sets the username and password to use - unless you set it within the `CURLOPT_PROXY` string. ## HTTP Proxy headers diff --git a/transfers/conn/reuse.md b/transfers/conn/reuse.md index 0c03b7b8a3..9c3691c185 100644 --- a/transfers/conn/reuse.md +++ b/transfers/conn/reuse.md @@ -10,10 +10,10 @@ benefits in speed and required resources. When libcurl is about to make a new connection for the purposes of doing a transfer, it first checks to see if there is an existing connection in the pool that it can reuse instead. The connection re-use check is done before any -DNS or other name resolving mechanism is used, so it is purely host name -based. If there is an existing live connection to the right hostname, a lot -of other properties (port number, protocol, etc) are also checked to see that -it can be used. +DNS or other name resolving mechanism is used, so it is purely hostname +based. If there is an existing live connection to the right hostname, a lot of +other properties (port number, protocol, etc) are also checked to see that it +can be used. ## Easy API pool diff --git a/transfers/options/all.md b/transfers/options/all.md index e69ee67f56..e3178fc1cd 100644 --- a/transfers/options/all.md +++ b/transfers/options/all.md @@ -3,7 +3,7 @@ This is a table of available options for `curl_easy_setopt()`. | Option | Purpose | -|--------------------------------------|------------------------------------------------| +|--------------------------------------|------------------------------------------------------------------------| | `CURLOPT_ABSTRACT_UNIX_SOCKET` | abstract Unix domain socket | | `CURLOPT_ACCEPT_ENCODING` | automatic decompression of HTTP downloads | | `CURLOPT_ACCEPTTIMEOUT_MS` | timeout waiting for FTP server to connect back | @@ -53,7 +53,7 @@ This is a table of available options for `curl_easy_setopt()`. | `CURLOPT_DNS_SERVERS` | DNS servers to use | | `CURLOPT_DNS_SHUFFLE_ADDRESSES` | shuffle IP addresses for hostname | | `CURLOPT_DNS_USE_GLOBAL_CACHE` | global DNS cache | -| `CURLOPT_DOH_SSL_VERIFYHOST` | verify the hostname in the DoH SSL certificate | +| `CURLOPT_DOH_SSL_VERIFYHOST` | verify the hostname in the DoH SSL certificate | | `CURLOPT_DOH_SSL_VERIFYPEER` | verify the DoH SSL certificate | | `CURLOPT_DOH_SSL_VERIFYSTATUS` | verify the DoH SSL certificate's status | | `CURLOPT_DOH_URL` | provide the DNS-over-HTTPS URL | @@ -189,7 +189,7 @@ This is a table of available options for `curl_easy_setopt()`. | `CURLOPT_PROXY_TLS13_CIPHERS` | ciphers suites for proxy TLS 1.3 | | `CURLOPT_PROXY_TLSAUTH_PASSWORD` | password to use for proxy TLS authentication | | `CURLOPT_PROXY_TLSAUTH_TYPE` | HTTPS proxy TLS authentication methods | -| `CURLOPT_PROXY_TLSAUTH_USERNAME` | user name to use for proxy TLS authentication | +| `CURLOPT_PROXY_TLSAUTH_USERNAME` | username to use for proxy TLS authentication | | `CURLOPT_PROXY_TRANSFER_MODE` | append FTP transfer mode to URL for proxy | | `CURLOPT_PROXY` | proxy to use | | `CURLOPT_PROXYAUTH` | HTTP proxy authentication methods | @@ -197,8 +197,8 @@ This is a table of available options for `curl_easy_setopt()`. | `CURLOPT_PROXYPASSWORD` | password to use with proxy authentication | | `CURLOPT_PROXYPORT` | port number the proxy listens on | | `CURLOPT_PROXYTYPE` | proxy protocol type | -| `CURLOPT_PROXYUSERNAME` | user name to use for proxy authentication | -| `CURLOPT_PROXYUSERPWD` | user name and password to use for proxy authentication | +| `CURLOPT_PROXYUSERNAME` | username to use for proxy authentication | +| `CURLOPT_PROXYUSERPWD` | username and password to use for proxy authentication | | `CURLOPT_PUT` | make an HTTP PUT request | | `CURLOPT_QUICK_EXIT` | allow to exit quickly | | `CURLOPT_QUOTE` | (S)FTP commands to run before transfer | @@ -210,7 +210,7 @@ This is a table of available options for `curl_easy_setopt()`. | `CURLOPT_REDIR_PROTOCOLS` | protocols allowed to redirect to | | `CURLOPT_REFERER` | the HTTP referer header | | `CURLOPT_REQUEST_TARGET` | alternative target for this request | -| `CURLOPT_RESOLVE` | provide custom hostname to IP address resolves | +| `CURLOPT_RESOLVE` | provide custom hostname to IP address resolves | | `CURLOPT_RESOLVER_START_DATA` | pointer passed to the resolver start callback | | `CURLOPT_RESOLVER_START_FUNCTION` | callback called before a new name resolve is started | | `CURLOPT_RESUME_FROM_LARGE` | offset to resume transfer from | @@ -287,7 +287,7 @@ This is a table of available options for `curl_easy_setopt()`. | `CURLOPT_TLS13_CIPHERS` | ciphers suites to use for TLS 1.3 | | `CURLOPT_TLSAUTH_PASSWORD` | password to use for TLS authentication | | `CURLOPT_TLSAUTH_TYPE` | TLS authentication methods | -| `CURLOPT_TLSAUTH_USERNAME` | user name to use for TLS authentication | +| `CURLOPT_TLSAUTH_USERNAME` | username to use for TLS authentication | | `CURLOPT_TRAILERDATA` | pointer passed to trailing headers callback | | `CURLOPT_TRAILERFUNCTION` | callback for sending trailing headers | | `CURLOPT_TRANSFER_ENCODING` | ask for HTTP Transfer Encoding | @@ -300,8 +300,8 @@ This is a table of available options for `curl_easy_setopt()`. | `CURLOPT_URL` | URL for this transfer | | `CURLOPT_USE_SSL` | request using SSL / TLS for the transfer | | `CURLOPT_USERAGENT` | HTTP user-agent header | -| `CURLOPT_USERNAME` | user name to use in authentication | -| `CURLOPT_USERPWD` | user name and password to use in authentication | +| `CURLOPT_USERNAME` | username to use in authentication | +| `CURLOPT_USERPWD` | username and password to use in authentication | | `CURLOPT_VERBOSE` | verbose mode | | `CURLOPT_WILDCARDMATCH` | directory wildcard transfers | | `CURLOPT_WRITEDATA` | pointer passed to the write callback | diff --git a/usingcurl/netrc.md b/usingcurl/netrc.md index bd9cc1cd50..9812aa1352 100644 --- a/usingcurl/netrc.md +++ b/usingcurl/netrc.md @@ -13,7 +13,11 @@ This being a widespread and well used concept, curl also supports it—if you as The .netrc file format is simple: you specify lines with a machine name and follow that with the login and password that are associated with that machine. -Each field is provided as a sequence of letters that ends with a space or newline. Since 7.84.0, curl also supports quoted strings. They start and end with double quotes (`"`) and support the escaped special letters `\"`, (newline), (carriage return), and (TAB). Quoted strings are the only way a space character can be used in a user name or password. +Each field is provided as a sequence of letters that ends with a space or +newline. Since 7.84.0, curl also supports quoted strings. They start and end +with double quotes (`"`) and support the escaped special letters `\"`, +(newline), (carriage return), and (TAB). Quoted strings are the only way a +space character can be used in a username or password. **machine name** @@ -27,7 +31,8 @@ This is the same as machine name except that `default` matches any name. There c **login name** -The user name string for the remote machine. You cannot use a space in the name. +The username string for the remote machine. You cannot use a space in the +name. **password string** @@ -54,9 +59,9 @@ It can also be written on a single line with the same functionality: machine example.com login daniel password qwerty -## User name matching +## Username matching -When a URL is provided with a user name and .netrc is used, then curl tries to +When a URL is provided with a username and .netrc is used, then curl tries to find the matching password for that machine and login combination. ## Enable netrc diff --git a/usingcurl/proxies/auth.md b/usingcurl/proxies/auth.md index c393229f65..ce41cab425 100644 --- a/usingcurl/proxies/auth.md +++ b/usingcurl/proxies/auth.md @@ -9,8 +9,8 @@ Authentication for proxies is similar to "normal" HTTP authentication. It is separate from the server authentication to allow clients to independently use both normal host authentication as well as proxy authentication. -With curl, you set the user name and password for the proxy authentication -with the `-U user:password` or `--proxy-user user:password` option: +With curl, you set the username and password for the proxy authentication with +the `-U user:password` or `--proxy-user user:password` option: curl -U daniel:secr3t -x myproxy:80 http://example.com diff --git a/usingcurl/proxies/env.md b/usingcurl/proxies/env.md index 641017932e..d18dad602c 100644 --- a/usingcurl/proxies/env.md +++ b/usingcurl/proxies/env.md @@ -21,10 +21,10 @@ precedence. ## No proxy -You sometimes end up in a situation where one or a few host names should be +You sometimes end up in a situation where one or a few hostnames should be excluded from going through the proxy that normally would be used. This is then done with the `NO_PROXY` variable. Set that to a comma- separated list of -host names that should not use a proxy when being accessed. You can set +hostnames that should not use a proxy when being accessed. You can set `NO_PROXY` to be a single asterisk ('\*') to match all hosts. If a name in the exclusion list starts with a dot (`.`), then the name matches diff --git a/usingcurl/scpsftp.md b/usingcurl/scpsftp.md index c138a45c17..3233284006 100644 --- a/usingcurl/scpsftp.md +++ b/usingcurl/scpsftp.md @@ -57,14 +57,14 @@ SFTP URL) is done like this: curl attempts to use your public key as found in the `.ssh` subdirectory in your home directory if the server offers public key authentication. When doing -so, you still need to tell curl which user name to use on the server. For +so, you still need to tell curl which username to use on the server. For example, the user 'john' lists the entries in his home directory on the remote SFTP server called 'sftp.example.com': curl -u john: sftp://sftp.example.com/ If curl cannot authenticate with the public key for any reason, it instead -attempts to use the user name + password if the server allows it and the +attempts to use the username + password if the server allows it and the credentials are passed on the command line. For example, the same user from above has the password `RHvxC6wUA` on a remote