From b093d884475b75d266ee2e1693c596db0416536e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 26 Jun 2026 22:57:40 +0200 Subject: [PATCH] tidy-up: typos, comment nits Closes #22294 --- RELEASE-NOTES | 2 +- docs/INFRASTRUCTURE.md | 2 +- docs/TODO.md | 12 ++++++------ docs/VULN-DISCLOSURE-POLICY.md | 2 +- docs/cmdline-opts/MANPAGE.md | 4 ++-- docs/internals/CREDENTIALS.md | 6 +++--- docs/tests/FILEFORMAT.md | 2 +- lib/altsvc.c | 2 +- lib/asyn-thrdd.c | 2 +- lib/asyn.h | 4 ++-- lib/cf-dns.c | 2 +- lib/curl_sha512_256.c | 2 +- lib/curl_trc.c | 2 +- lib/curlx/inet_pton.c | 25 +++++++++++++------------ lib/ftp.c | 4 ++-- lib/hostip4.c | 2 +- lib/http.c | 4 ++-- lib/peer.h | 10 +++++----- lib/setopt.c | 4 ++-- lib/socks.c | 2 +- lib/vquic/cf-ngtcp2-cmn.c | 8 ++++---- lib/vssh/libssh.c | 2 +- lib/vtls/openssl.c | 2 +- projects/OS400/os400sys.c | 10 +++++----- projects/vms/config_h.com | 2 +- scripts/verify-release | 2 +- tests/http/test_06_eyeballs.py | 4 ++-- tests/http/test_10_proxy.py | 8 ++++---- tests/http/test_20_websockets.py | 2 +- tests/http/test_21_resolve.py | 12 ++++++------ tests/http/test_60_h3_proxy.py | 2 +- tests/libtest/cli_hx_download.c | 2 +- tests/secureserver.pl | 2 +- tests/unit/unit1658.c | 12 ++++++------ tests/unit/unit2600.c | 16 ++++++++-------- 35 files changed, 91 insertions(+), 90 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2ef9aa5267..e886c14cc1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -26,7 +26,7 @@ This release includes the following bugfixes: o cmake: stop probing unused `float.h` for `STDC_HEADERS` [10] o conncache: connection alive checks intervals [20] o content_encoding: give a clear error on multi-member gzip [46] - o CREDENTIALS.md: remove comment about emtpy user/pass [50] + o CREDENTIALS.md: remove comment about empty user/pass [50] o curl_ws_meta.md: polish and better vocabulary [19] o CURLOPT_SSH_*_KEYFILE: used for setting up, then no more [48] o CURLSHOPT_(UN)SHARE.md: do not modify shares while in use [44] diff --git a/docs/INFRASTRUCTURE.md b/docs/INFRASTRUCTURE.md index 1679223609..ddcd1289d9 100644 --- a/docs/INFRASTRUCTURE.md +++ b/docs/INFRASTRUCTURE.md @@ -191,7 +191,7 @@ chat about curl and related topics. This done in the `#curl` channel on the `libra.chat` IRC network. **Daniel Stenberg** (`bagder`) is registered owner of the channel. We do not run any IRC servers or services ourselves. -`curelbot` is a service in the channel that shows details about GitHub issues +`curlbot` is a service in the channel that shows details about GitHub issues and pull requests when publicly mentioned using #[number]. The bot is run by user `TheAssassin`. diff --git a/docs/TODO.md b/docs/TODO.md index 2838b0b0d9..aa6611a0c6 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -57,7 +57,7 @@ to share data in more powerful ways. ## updated DNS server while running If `/etc/resolv.conf` gets updated while a program using libcurl is running, it -is may cause name resolves to fail unless `res_init()` is called. We should +may cause name resolves to fail unless `res_init()` is called. We should consider calling `res_init()` + retry once unconditionally on all name resolve failures to mitigate against this. Firefox works like that. Note that Windows does not have `res_init()` or an alternative. @@ -269,7 +269,7 @@ This is not detailed in any FTP specification. ## Passive transfer could try other IP addresses -When doing FTP operations through a proxy at localhost, the reported spotted +When doing FTP operations through a proxy at localhost, the reporter 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. @@ -284,8 +284,8 @@ See [curl issue 1508](https://github.com/curl/curl/issues/1508) When curl receives a body response from a CONNECT request to a proxy, it always reads and ignores 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? +optionally would be able to make that response available. Via a new callback? +Through some other means? See [curl issue 9513](https://github.com/curl/curl/issues/9513) @@ -763,7 +763,7 @@ backed up from those that are either not ready or have not changed. 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 is -sensible to include it in any integer snapshot or backup of the system. +sensible to include it in any incremental snapshot or backup of the system. See [curl issue 3354](https://github.com/curl/curl/issues/3354) @@ -825,7 +825,7 @@ one, which then could make curl decide to rather retry the transfer on that URL only instead of the original operation to the original URL. Perhaps extra emphasized if the original transfer is a large POST that -redirects to a separate GET, and that GET is what gets the 529 +redirects to a separate GET, and that GET is what gets the 429 See [curl issue 5462](https://github.com/curl/curl/issues/5462) diff --git a/docs/VULN-DISCLOSURE-POLICY.md b/docs/VULN-DISCLOSURE-POLICY.md index 847579edb5..2ae863d105 100644 --- a/docs/VULN-DISCLOSURE-POLICY.md +++ b/docs/VULN-DISCLOSURE-POLICY.md @@ -363,7 +363,7 @@ A *legacy dependency* is here defined as: - there are modern versions of equivalent or better functionality offered and in common use -## weak algorithms required for functionality +## Weak algorithms required for functionality curl supports several algorithms that are considered weak, like DES and MD5. These algorithms are still not curl security vulnerabilities or security diff --git a/docs/cmdline-opts/MANPAGE.md b/docs/cmdline-opts/MANPAGE.md index 1e4facd954..972fc9a51b 100644 --- a/docs/cmdline-opts/MANPAGE.md +++ b/docs/cmdline-opts/MANPAGE.md @@ -114,12 +114,12 @@ During rendering, the generator expands them as follows: ## Generate -`managen mainpage [list of markdown option file names]` +`managen mainpage [list of markdown option filenames]` This command outputs a single huge nroff file, meant to become `curl.1`. The full curl man page. -`managen ascii [list of markdown option file names]` +`managen ascii [list of markdown option filenames]` This command outputs a single text file, meant to become `curl.txt`. The full curl man page in text format, used to build `tool_hugehelp.c`. diff --git a/docs/internals/CREDENTIALS.md b/docs/internals/CREDENTIALS.md index a99b0fa317..5f4aa97885 100644 --- a/docs/internals/CREDENTIALS.md +++ b/docs/internals/CREDENTIALS.md @@ -12,7 +12,7 @@ Authorization credentials are kept in `struct Curl_creds`. This contains: * `passwd`: the password, maybe the empty string * `sasl_authzid`: the SASL `authz` value, maybe the empty string * `oauth_bearer`: the OAUTH bearer token, maybe the empty string -* `source`: where the credentials from +* `source`: where the credentials come from * `refcount`: a reference counter to link/unlink `creds` With reference counting, `creds` can be linked in several places. @@ -54,12 +54,12 @@ password and `netrc` is consulted as well (when built in). ### `conn->creds` Once `data->state.creds` is known, the connection credentials are -determined. For protocols that tie authorization to everything send +determined. For protocols that tie authorization to everything sent on a connection (protocols without flag `PROTOPT_CREDSPERREQUEST`), `conn->creds` is linked to `data->state.creds`. Only connections carrying the same credentials may be reused. -Protocol with flag `PROTOPT_CREDSPERREQUEST` leave `conn->creds` empty, +Protocols with flag `PROTOPT_CREDSPERREQUEST` leave `conn->creds` empty, as connections for such protocols may be reused with different credentials. diff --git a/docs/tests/FILEFORMAT.md b/docs/tests/FILEFORMAT.md index bd7ed82465..5ded0d343f 100644 --- a/docs/tests/FILEFORMAT.md +++ b/docs/tests/FILEFORMAT.md @@ -421,7 +421,7 @@ issue. Commands for the test DNS server. -- `A: [dotted ipv4 address]` - set IPv4 address to return +- `A: [dotted IPv4 address]` - set IPv4 address to return - `AAAA: [numerical IPv6 address]` - set IPv6 address to return, with or without `[]` diff --git a/lib/altsvc.c b/lib/altsvc.c index 6b8b2617f9..11c75d45df 100644 --- a/lib/altsvc.c +++ b/lib/altsvc.c @@ -531,7 +531,7 @@ static bool altsvc_parse_dest(const char **pp, /* quoted string, with hostname or just :port ? */ if(curlx_str_single(pp, ':')) { /* is hostname:port ? */ - if(curlx_str_single(pp, '[')) { /* DNS hostname/ipv4 */ + if(curlx_str_single(pp, '[')) { /* DNS hostname/IPv4 */ if(curlx_str_until(pp, dsthost, MAX_ALTSVC_HOSTLEN, ':')) { infof(data, "Bad alt-svc hostname, ignoring."); return FALSE; diff --git a/lib/asyn-thrdd.c b/lib/asyn-thrdd.c index aeadec11a4..dc7c7b0418 100644 --- a/lib/asyn-thrdd.c +++ b/lib/asyn-thrdd.c @@ -618,7 +618,7 @@ CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, return result; #ifdef CURLRES_IPV6 - /* Do not start an AAAA query for an ipv4 address when + /* Do not start an AAAA query for an IPv4 address when * we will start an A query for it. */ if((async->dns_queries & CURL_DNSQ_AAAA) && !(async->is_ipv4addr && (async->dns_queries & CURL_DNSQ_A))) { diff --git a/lib/asyn.h b/lib/asyn.h index ed50933654..7df9b681ba 100644 --- a/lib/asyn.h +++ b/lib/asyn.h @@ -137,8 +137,8 @@ struct async_thrdd_item; /* Context for threaded resolver */ struct async_thrdd_ctx { - struct async_thrdd_item *res_A; /* ipv4 result */ - struct async_thrdd_item *res_AAAA; /* ipv6 result */ + struct async_thrdd_item *res_A; /* IPv4 result */ + struct async_thrdd_item *res_AAAA; /* IPv6 result */ #if defined(USE_HTTPSRR) && defined(USE_ARES) struct { ares_channel channel; diff --git a/lib/cf-dns.c b/lib/cf-dns.c index 631c987be2..6388d65a9e 100644 --- a/lib/cf-dns.c +++ b/lib/cf-dns.c @@ -219,7 +219,7 @@ static bool cf_dns_ready_to_connect(struct Curl_cfilter *cf, return TRUE; #ifdef USE_CURL_ASYNC else { - /* We want AAAA answer as we prefer ipv6. If a sub-filter desires + /* We want AAAA answer as we prefer IPv6. If a sub-filter desires * HTTPS-RR, we check for that query as well. */ uint8_t wanted_answers = CURL_DNSQ_AAAA; if(Curl_conn_cf_wants_httpsrr(cf, data)) diff --git a/lib/curl_sha512_256.c b/lib/curl_sha512_256.c index 0ce669603e..d0c81e7a55 100644 --- a/lib/curl_sha512_256.c +++ b/lib/curl_sha512_256.c @@ -650,7 +650,7 @@ static CURLcode Curl_sha512_256_update(void *context, if(length == 0) return CURLE_OK; /* Shortcut, do nothing */ - /* Note: (count & (CURL_SHA512_256_BLOCK_SIZE-1)) + /* Note: (count & (CURL_SHA512_256_BLOCK_SIZE - 1)) equals (count % CURL_SHA512_256_BLOCK_SIZE) for this block size. */ bytes_have = (unsigned int)(ctx->count & (CURL_SHA512_256_BLOCK_SIZE - 1)); ctx->count += length; diff --git a/lib/curl_trc.c b/lib/curl_trc.c index 87082f031b..91b180f908 100644 --- a/lib/curl_trc.c +++ b/lib/curl_trc.c @@ -545,7 +545,7 @@ static struct trc_feat_def trc_feats[] = { { &Curl_trc_feat_ssls, TRC_CT_NETWORK }, #endif #ifdef USE_SSH - { &Curl_trc_feat_ssh, TRC_CT_PROTOCOL }, + { &Curl_trc_feat_ssh, TRC_CT_PROTOCOL }, #endif #if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP) { &Curl_trc_feat_ws, TRC_CT_PROTOCOL }, diff --git a/lib/curlx/inet_pton.c b/lib/curlx/inet_pton.c index c8f63a1413..b3e806602a 100644 --- a/lib/curlx/inet_pton.c +++ b/lib/curlx/inet_pton.c @@ -187,18 +187,19 @@ static int inet_pton6(const char *src, unsigned char *dst) return 1; } -/* int inet_pton(af, src, dst) - * convert from presentation format (which usually means ASCII printable) - * to network format (which is usually some kind of binary format). - * return: - * 1 if the address was valid for the specified address family - * 0 if the address was not valid (`dst' is untouched in this case) - * -1 if some other error occurred (`dst' is untouched in this case, too) - * notice: - * On Windows we store the error in the thread errno, not - * in the Winsock error code. This is to avoid losing the - * actual last Winsock error. When this function returns - * -1, check errno not SOCKERRNO. +/* + * Convert from presentation format (which usually means ASCII printable) + * to network format (which is usually some kind of binary format). + * + * Return: + * 1 if the address was valid for the specified address family + * 0 if the address was not valid (`dst' is untouched in this case) + * -1 if some other error occurred (`dst' is untouched in this case, too) + * + * On Windows we store the error in the thread errno, not in the Winsock error + * code. This is to avoid losing the actual last Winsock error. When this + * function returns NULL, check errno not SOCKERRNO. + * * author: * Paul Vixie, 1996. */ diff --git a/lib/ftp.c b/lib/ftp.c index 8b4d9b663b..c4b1b5fcfd 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -929,11 +929,11 @@ static CURLcode ftp_port_parse_string(struct Curl_easy *data, #ifdef USE_IPV6 struct sockaddr_in6 * const sa6 = (void *)ss; #endif - /* either ipv6 or (ipv4|domain|interface):port(-range) */ + /* either IPv6 or (ipv4|domain|interface):port(-range) */ addrlen = ip_end - string_ftpport; #ifdef USE_IPV6 if(curlx_inet_pton(AF_INET6, string_ftpport, &sa6->sin6_addr) == 1) { - /* ipv6 */ + /* IPv6 */ addrlen = strlen(string_ftpport); ip_end = NULL; /* this got no port ! */ } diff --git a/lib/hostip4.c b/lib/hostip4.c index c8cc4dc340..b4566c5baa 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -91,7 +91,7 @@ struct Curl_addrinfo *Curl_sync_getaddrinfo(struct Curl_easy *data, !defined(CURLRES_AMIGA) /* - * Curl_ipv4_resolve_r() - ipv4 thread-safe resolver function. + * Curl_ipv4_resolve_r() - IPv4 thread-safe resolver function. * * This is used for both synchronous and asynchronous resolver builds, * implying that only thread-safe code and function calls may be used. diff --git a/lib/http.c b/lib/http.c index ef2bd8f963..9af3a70514 100644 --- a/lib/http.c +++ b/lib/http.c @@ -2054,9 +2054,9 @@ static CURLcode http_set_aptr_host(struct Curl_easy *data) } else { /* This is the HTTP Host: header, so we want - * - for ipv6 origins: "[ipv6-address]" where the ipv6 address is + * - for IPv6 origins: "[ipv6-address]" where the IPv6 address is * found in origin->hostname, stripped of zoneid/scopeid. - * - the (IDN converted) origin->hostname (DNS name or ipv4) otherwise. + * - the (IDN converted) origin->hostname (DNS name or IPv4) otherwise. * Note: zoneid/scopeid only applies to local routing and has no * meaning on the remote HTTP server (eg. would confuse it). */ bool ipv6 = (bool)data->state.origin->ipv6; diff --git a/lib/peer.h b/lib/peer.h index f6ed00cd48..a0a3054cd8 100644 --- a/lib/peer.h +++ b/lib/peer.h @@ -33,9 +33,9 @@ struct Curl_scheme; struct Curl_peer { const struct Curl_scheme *scheme; /* url scheme */ char *hostname; /* normalized hostname (IDN decoded when supported) */ - char *zoneid; /* NULL or ipv6 zone identifier */ + char *zoneid; /* NULL or IPv6 zone identifier */ uint32_t refcount; /* created with 1, freed when dropping to 0 */ - uint32_t scopeid; /* != 0, ipv6 scope to use */ + uint32_t scopeid; /* != 0, IPv6 scope to use */ uint16_t port; BIT(unix_socket); /* hostname is a UDS path without the prefix */ BIT(abstract_uds); /* only TRUE when `unix_socket` also TRUE */ @@ -47,12 +47,12 @@ struct Curl_peer { * - `peer->user_hostname` is the passed `hostname` * - `peer->hostname` is the normalized `hostname` via * + IDN conversion if it has non-ASCII characters - * + stripping of surrounding '[]' for URL formatted ipv6 addresses + * + stripping of surrounding '[]' for URL formatted IPv6 addresses * + the path alone in case of a unix domain socket, e.g. hostname * starts with CURL_PEER_UDS_PREFIX and is longer * Scans for IPv6 addresses even without surrounding '[]'. - * - `zoneid` ipv6 zone identifier or NULL - * - `scopeid` ipv6 scopeid of zoneid, when known. + * - `zoneid` IPv6 zone identifier or NULL + * - `scopeid` IPv6 scopeid of zoneid, when known. */ CURLcode Curl_peer_create(struct Curl_easy *data, const struct Curl_scheme *scheme, diff --git a/lib/setopt.c b/lib/setopt.c index a95a11ef0e..9a87e748d2 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2054,7 +2054,7 @@ static CURLcode setopt_cptr_http_mqtt(struct Curl_easy *data, * If the encoding is set to "" we use an Accept-Encoding header that * encompasses all the encodings we support. * If the encoding is set to NULL we do not send an Accept-Encoding header - * and ignore an received Content-Encoding header. + * and ignore any received Content-Encoding header. * */ if(ptr && !*ptr) { @@ -2077,7 +2077,7 @@ static CURLcode setopt_cptr_http_mqtt(struct Curl_easy *data, */ result = Curl_setstropt(&s->str[STRING_AWS_SIGV4], ptr); /* - * Basic been set by default it need to be unset here + * Basic has been set by default; it needs to be unset here. */ if(s->str[STRING_AWS_SIGV4]) s->httpauth = CURLAUTH_AWS_SIGV4; diff --git a/lib/socks.c b/lib/socks.c index 6c458c505d..ab3663e886 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -361,7 +361,7 @@ static CURLproxycode socks4_resolving(struct socks_ctx *sx, return CURLPX_SEND_REQUEST; } else { - /* No ipv4 address resolved */ + /* No IPv4 address resolved */ failf(data, "SOCKS4 connection to %s not supported", sx->dest->hostname); return CURLPX_RESOLVE_HOST; } diff --git a/lib/vquic/cf-ngtcp2-cmn.c b/lib/vquic/cf-ngtcp2-cmn.c index c1f9ae40ce..1e0b5def65 100644 --- a/lib/vquic/cf-ngtcp2-cmn.c +++ b/lib/vquic/cf-ngtcp2-cmn.c @@ -876,10 +876,10 @@ static CURLcode cf_ngtcp2_on_session_reuse(struct Curl_cfilter *cf, *do_early_data = TRUE; } } - else { /* h3_conn_init set, assume done */ - ctx->use_earlydata = TRUE; - cf->connected = TRUE; - *do_early_data = TRUE; + else { /* init_h3_conn_cb not set, assume done */ + ctx->use_earlydata = TRUE; + cf->connected = TRUE; + *do_early_data = TRUE; } } #else /* not supported in the TLS backend */ diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index ea21e19289..3d1203d3b6 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -2582,7 +2582,7 @@ static CURLcode myssh_connect(struct Curl_easy *data, bool *done) return CURLE_FAILED_INIT; } - /* For ipv6 origins, use the `user_hostname` that has the "[]" enclosure. + /* For IPv6 origins, use the `user_hostname` that has the "[]" enclosure. * Otherwise, use `hostname` that is IDN converted. */ rc = ssh_options_set(sshc->ssh_session, SSH_OPTIONS_HOST, conn->origin->ipv6 ? diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 406037bcc3..094fc3a374 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -2144,7 +2144,7 @@ static CURLcode ossl_verifyhost(struct Curl_easy *data, else if(dNSName || iPAddress) { const char *tname = (peer->type == CURL_SSL_PEER_DNS) ? "hostname" : (peer->type == CURL_SSL_PEER_IPV4) ? - "ipv4 address" : "ipv6 address"; + "IPv4 address" : "IPv6 address"; infof(data, " subjectAltName does not match %s %s", tname, peer->origin->user_hostname); failf(data, "SSL: no alternative certificate subject name matches " diff --git a/projects/OS400/os400sys.c b/projects/OS400/os400sys.c index fc7ae3c612..207eb297bb 100644 --- a/projects/OS400/os400sys.c +++ b/projects/OS400/os400sys.c @@ -57,11 +57,11 @@ #include "os400sys.h" -/** -*** QADRT OS/400 ASCII runtime defines only the most used procedures, but a -*** lot of them are not supported. This module implements ASCII wrappers for -*** those that are used by libcurl, but not defined by QADRT. -**/ +/* + * QADRT OS/400 ASCII runtime defines only the most used procedures, but a + * lot of them are not supported. This module implements ASCII wrappers for + * those that are used by libcurl, but not defined by QADRT. + */ #pragma convert(0) /* Restore EBCDIC. */ diff --git a/projects/vms/config_h.com b/projects/vms/config_h.com index 2de76ad731..a19bc1affa 100644 --- a/projects/vms/config_h.com +++ b/projects/vms/config_h.com @@ -20,7 +20,7 @@ $! $! The config_vms.h will be invoked by the resulting config.h file. $! $! This procedure knows about the DEC C RTL on the system it is on. -$! Future versions may be handle the GNV, the OpenVMS porting library, +$! Future versions may handle the GNV, the OpenVMS porting library, $! and others. $! $! This procedure may not guess the options correctly for all architectures, diff --git a/scripts/verify-release b/scripts/verify-release index 920303aec0..f0339d306f 100755 --- a/scripts/verify-release +++ b/scripts/verify-release @@ -65,7 +65,7 @@ rm -rf _tarballs/* # checksum the original tarball to compare with later sha256sum -- "$tarball" >_tarballs/checksum -# extract version number from file name +# extract version number from filename tarver=$(echo "$tarball" | sed 's/curl-\([0-9.]*\)\..*/\1/') # extract the version from the official header file diff --git a/tests/http/test_06_eyeballs.py b/tests/http/test_06_eyeballs.py index a423524fa5..d883822d54 100644 --- a/tests/http/test_06_eyeballs.py +++ b/tests/http/test_06_eyeballs.py @@ -103,13 +103,13 @@ class TestEyeballs: # check timers when trying 3 unresponsive addresses @pytest.mark.skipif(condition=not Env.curl_has_feature('IPv6'), - reason='curl lacks ipv6 support') + reason='curl lacks IPv6 support') @pytest.mark.skipif(condition=not Env.curl_has_feature('AsynchDNS'), reason='curl lacks async DNS support') @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings") def test_06_13_timers(self, env: Env): curl = CurlClient(env=env) - # ipv6 0100::/64 is supposed to go into the void (rfc6666) + # IPv6 0100::/64 is supposed to go into the void (rfc6666) r = curl.http_download(urls=['https://xxx.invalid/'], extra_args=[ '--resolve', 'xxx.invalid:443:0100::1,0100::2,0100::3', '--connect-timeout', '1', diff --git a/tests/http/test_10_proxy.py b/tests/http/test_10_proxy.py index 5843c30b08..7ef77465bc 100644 --- a/tests/http/test_10_proxy.py +++ b/tests/http/test_10_proxy.py @@ -392,9 +392,9 @@ class TestProxy: r.check_response(count=1, http_status=200, protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1') - # download via http: ipv4 proxy (no tunnel) using IP address, IPv6 only + # download via http: IPv4 proxy (no tunnel) using IP address, IPv6 only @pytest.mark.skipif(condition=not Env.curl_has_feature('IPv6'), - reason='no ipv6 support') + reason='no IPv6 support') def test_10_15_proxy_ip_addr(self, env: Env, httpd): proto = 'http/1.1' curl = CurlClient(env=env, force_resolv=False) @@ -406,9 +406,9 @@ class TestProxy: r.check_exit_code(0) r.check_response(count=1, http_status=200, protocol='HTTP/1.1') - # download via http: ipv6 proxy (no tunnel) using IP address, IPv4 only + # download via http: IPv6 proxy (no tunnel) using IP address, IPv4 only @pytest.mark.skipif(condition=not Env.curl_has_feature('IPv6'), - reason='no ipv6 support') + reason='no IPv6 support') def test_10_16_proxy_ip_addr(self, env: Env, httpd): proto = 'http/1.1' curl = CurlClient(env=env, force_resolv=False) diff --git a/tests/http/test_20_websockets.py b/tests/http/test_20_websockets.py index 0a86e6439b..a3f5e3a3c0 100644 --- a/tests/http/test_20_websockets.py +++ b/tests/http/test_20_websockets.py @@ -211,7 +211,7 @@ class TestWebsockets: r = client.run(args=[f'-{model}', '-c', str(count), '-m', str(large), url]) r.check_exit_code(0) - # use ws:// url with HTTP proxy, check that it tunnels automatically + # use ws:// URL with HTTP proxy, check that it tunnels automatically def test_20_10_proxy_http(self, env: Env, httpd, ws_echo): curl = CurlClient(env=env) url = f'ws://127.0.0.1:{env.ws_port}/' diff --git a/tests/http/test_21_resolve.py b/tests/http/test_21_resolve.py index 8f2937f42f..a50997409d 100644 --- a/tests/http/test_21_resolve.py +++ b/tests/http/test_21_resolve.py @@ -51,7 +51,7 @@ class TestResolve: indir = httpd.docs_dir env.make_data_file(indir=indir, fname="data-0k", fsize=0) - # use .invalid host name that should never resolv + # use .invalid hostname that should never resolv def test_21_01_resolv_invalid_one(self, env: Env, httpd, nghttpx): count = 1 run_env = os.environ.copy() @@ -62,7 +62,7 @@ class TestResolve: r.check_exit_code(6) r.check_stats(count=count, http_status=0, exitcode=6) - # use .invalid host name, one after the other + # use .invalid hostname, one after the other @pytest.mark.parametrize("delay_ms", [1, 50]) def test_21_02_resolv_invalid_serial(self, env: Env, delay_ms, httpd, nghttpx): count = 10 @@ -74,7 +74,7 @@ class TestResolve: r.check_exit_code(6) r.check_stats(count=count, http_status=0, exitcode=6) - # use .invalid host name, parallel + # use .invalid hostname, parallel @pytest.mark.parametrize("delay_ms", [1, 50]) def test_21_03_resolv_invalid_parallel(self, env: Env, delay_ms, httpd, nghttpx): count = 20 @@ -88,7 +88,7 @@ class TestResolve: r.check_exit_code(6) r.check_stats(count=count, http_status=0, exitcode=6) - # resolve first url with ipv6 only and fail that, resolve second + # resolve first URL with IPv6 only and fail that, resolve second # with ipv*, should succeed. def test_21_04_resolv_inv_v6(self, env: Env, httpd): count = 2 @@ -100,7 +100,7 @@ class TestResolve: pytest.skip(f'example client not built: {client.name}') dfiles = [client.download_file(i) for i in range(count)] self._clean_files(dfiles) - # let the first URL resolve via ipv6 only, which we force to fail + # let the first URL resolve via IPv6 only, which we force to fail r = client.run(args=[ '-n', f'{count}', '-6', '-C', env.ca.cert_file, url ]) @@ -108,7 +108,7 @@ class TestResolve: assert not os.path.exists(dfiles[0]) assert os.path.exists(dfiles[1]) - # use .invalid host name, parallel, single resolve thread + # use .invalid hostname, parallel, single resolve thread @pytest.mark.skipif(condition=not Env.curl_resolv_threaded(), reason="no threaded resolver") def test_21_05_resolv_single_thread(self, env: Env, httpd, nghttpx): count = 10 diff --git a/tests/http/test_60_h3_proxy.py b/tests/http/test_60_h3_proxy.py index 9382ef70d9..29630e5b07 100644 --- a/tests/http/test_60_h3_proxy.py +++ b/tests/http/test_60_h3_proxy.py @@ -552,7 +552,7 @@ class TestH3Proxy: # _require_available(h2o_proxy=h2o_proxy) # curl = CurlClient(env=env, timeout=15) # url = f"https://localhost:{h2o_proxy.port}/data.json" - # # ipv6 0100::/64 is supposed to go into the void (rfc6666) + # # IPv6 0100::/64 is supposed to go into the void (rfc6666) # xargs = [ # '--proxy', 'https://xxx.invalid/', # '--resolve', 'xxx.invalid:443:0100::1,0100::2,0100::3', diff --git a/tests/libtest/cli_hx_download.c b/tests/libtest/cli_hx_download.c index b472ed5691..f964067f15 100644 --- a/tests/libtest/cli_hx_download.c +++ b/tests/libtest/cli_hx_download.c @@ -287,7 +287,7 @@ static void usage_hx_download(const char *msg) " -r :: resolve information\n" " -T number max concurrent connections total\n" " -V http_version (http/1.1, h2, h3) http version to use\n" - " -6 use ipv6 for resolving the FIRST URL\n" + " -6 use IPv6 for resolving the FIRST URL\n" ); } diff --git a/tests/secureserver.pl b/tests/secureserver.pl index 5025d47b4b..5aa82f4a0f 100755 --- a/tests/secureserver.pl +++ b/tests/secureserver.pl @@ -262,7 +262,7 @@ if($stunnel_version < 400) { $socketopt = "-O a:SO_REUSEADDR=1"; } # TODO: we do not use $host_ip in this old version. I find - # no documentation how to. But maybe ipv6 is not available anyway? + # no documentation how to. But maybe IPv6 is not available anyway? $cmd = "\"$stunnel\" -p $certfile -P $pidfile "; $cmd .= "-d $accept_port -r $target_port -f -D $loglevel "; $cmd .= ($socketopt) ? "$socketopt " : ""; diff --git a/tests/unit/unit1658.c b/tests/unit/unit1658.c index 1491e9338f..49859c69c8 100644 --- a/tests/unit/unit1658.c +++ b/tests/unit/unit1658.c @@ -355,7 +355,7 @@ static CURLcode test_unit1658(const char *arg) "r:43|" }, { - "alpn + two ipv4 addresses", + "alpn + two IPv4 addresses", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x01" /* RR (1 == ALPN) */ @@ -370,7 +370,7 @@ static CURLcode test_unit1658(const char *arg) "r:0|p:16|.|alpn:10|ipv4:192.168.0.1|ipv4:192.168.0.2|" }, { - "alpn + two ipv4 addresses in wrong order", + "alpn + two IPv4 addresses in wrong order", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x04" /* RR (4 == Ipv4hints) */ @@ -385,7 +385,7 @@ static CURLcode test_unit1658(const char *arg) "r:8|" }, { - "alpn + ipv4 address with wrong size", + "alpn + IPv4 address with wrong size", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x01" /* RR (1 == ALPN) */ @@ -399,7 +399,7 @@ static CURLcode test_unit1658(const char *arg) "r:43|" }, { - "alpn + one ipv6 address", + "alpn + one IPv6 address", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x01" /* RR (1 == ALPN) */ @@ -413,7 +413,7 @@ static CURLcode test_unit1658(const char *arg) "r:0|p:16|.|alpn:10|ipv6:fe80:dabb:c1ff:fea3:8a22:1234:5678:9123|" }, { - "alpn + one ipv6 address with wrong size", + "alpn + one IPv6 address with wrong size", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x01" /* RR (1 == ALPN) */ @@ -427,7 +427,7 @@ static CURLcode test_unit1658(const char *arg) "r:43|" }, { - "alpn + two ipv6 addresses", + "alpn + two IPv6 addresses", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x01" /* RR (1 == ALPN) */ diff --git a/tests/unit/unit2600.c b/tests/unit/unit2600.c index a8affbb9eb..c77c3a4fe7 100644 --- a/tests/unit/unit2600.c +++ b/tests/unit/unit2600.c @@ -268,12 +268,12 @@ static void check_result(const struct test_case *tc, struct test_result *tr) fail(msg); } if(tr->cf4.creations != tc->exp_cf4_creations) { - curl_msprintf(msg, "%d: expected %d ipv4 creations, but got %d", + curl_msprintf(msg, "%d: expected %d IPv4 creations, but got %d", tc->id, tc->exp_cf4_creations, tr->cf4.creations); fail(msg); } if(tr->cf6.creations != tc->exp_cf6_creations) { - curl_msprintf(msg, "%d: expected %d ipv6 creations, but got %d", + curl_msprintf(msg, "%d: expected %d IPv6 creations, but got %d", tc->id, tc->exp_cf6_creations, tr->cf6.creations); fail(msg); } @@ -290,7 +290,7 @@ static void check_result(const struct test_case *tc, struct test_result *tr) fail(msg); } if(tr->cf6.creations && tr->cf4.creations && tc->pref_family) { - /* did ipv4 and ipv6 both, expect the preferred family to start right away + /* did IPv4 and IPv6 both, expect the preferred family to start right away * with the other being delayed by the happy_eyeball_timeout */ struct ai_family_stats *stats1 = !strcmp(tc->pref_family, "v6") ? &tr->cf6 : &tr->cf4; @@ -359,7 +359,7 @@ static void test_connect(CURL *easy, const struct test_case *tc) * - replace the creation of the TCP socket filter with our test filter * - test filter does nothing and reports failure after configured delay * - we feed addresses into the resolve cache to simulate different cases - * - we monitor how many instances of ipv4/v6 attempts are made and when + * - we monitor how many instances of IPv4/IPv6 attempts are made and when * - for mixed families, we expect HAPPY_EYEBALLS_TIMEOUT to trigger * * Max Duration checks needs to be conservative since CI jobs are not @@ -384,20 +384,20 @@ static CURLcode test_unit2600(const char *arg) { 1, TURL, "abc.test:123:192.0.2.1", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 1, 0, 200, TC_TMOT, R_FAIL, NULL, 1 }, - /* 1 ipv4, fails after ~200ms, reports COULDNT_CONNECT */ + /* 1 IPv4, fails after ~200ms, reports COULDNT_CONNECT */ { 2, TURL, "abc.test:123:192.0.2.1,192.0.2.2", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 2, 0, 400, TC_TMOT, R_FAIL, NULL, 2 }, - /* 2 ipv4, fails after ~400ms, reports COULDNT_CONNECT */ + /* 2 IPv4, fails after ~400ms, reports COULDNT_CONNECT */ #ifdef USE_IPV6 { 3, TURL, "abc.test:123:::1", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 0, 1, 200, TC_TMOT, R_FAIL, NULL, 1 }, - /* 1 ipv6, fails after ~200ms, reports COULDNT_CONNECT */ + /* 1 IPv6, fails after ~200ms, reports COULDNT_CONNECT */ { 4, TURL, "abc.test:123:::1,::2", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 0, 2, 400, TC_TMOT, R_FAIL, NULL, 2 }, - /* 2 ipv6, fails after ~400ms, reports COULDNT_CONNECT */ + /* 2 IPv6, fails after ~400ms, reports COULDNT_CONNECT */ { 5, TURL, "abc.test:123:192.0.2.1,::1", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 1, 1, 350, TC_TMOT, R_FAIL, "v6", 2 },