From: Viktor Szakats Date: Fri, 11 Jul 2025 19:50:23 +0000 (+0200) Subject: GHA/checksrc: expand spellcheck, fix issues found X-Git-Tag: curl-8_16_0~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0260e8465a2373b22588086acdfa5f4cf0e16e29;p=thirdparty%2Fcurl.git GHA/checksrc: expand spellcheck, fix issues found - codespell: break logic out into its own runnable script. Allowing to run it on local machines. - codespell: install via `pip`, bump to latest version. - codespell: show version number in CI log. - codespell: drop no longer needed word exception: `msdos`. - codespell: include all curl source tree, except `packages` and `winbuild`. Drop an obsolete file exclusion. - add new spellchecker job using the `typos` tool. It includes the codespell dictionary and a couple more. Use linuxbrew to install it. This takes 10 seconds, while installing via `cargo` from source would take over a minute. - codespell: introduce an inline ignore filter compatible with `cspell` Make `typos` recognize it, too. Move single exceptions inline. Fix new typos found. Also rename variables and words to keep spellchecking exceptions at minumum. This involves touching some tests. Also switch base64 strings to `%b64[]` to avoid false positives. Ref: https://github.com/crate-ci/typos/blob/master/docs/reference.md Ref: https://github.com/codespell-project/codespell?tab=readme-ov-file#inline-ignore Ref: https://github.com/codespell-project/codespell/issues/1212#issuecomment-1721152455 Ref: https://cspell.org/docs/Configuration/document-settings Closes #17905 --- diff --git a/.github/scripts/codespell-ignore.txt b/.github/scripts/codespell-ignore.txt index a239d9ef54..fa8a432b95 100644 --- a/.github/scripts/codespell-ignore.txt +++ b/.github/scripts/codespell-ignore.txt @@ -1,16 +1,21 @@ # Copyright (C) Daniel Stenberg, , et al. # # SPDX-License-Identifier: curl +anonymou +aNULL +bu clen -te -wont -statics -nome -wast -numer -anull +CNA +hel +htpt inout -msdos -ba -fo -ede +PASE +passwor +perfec +proxys +seh +ser +strat +te +UE +WONT diff --git a/.github/scripts/codespell.sh b/.github/scripts/codespell.sh new file mode 100755 index 0000000000..766eeeb87c --- /dev/null +++ b/.github/scripts/codespell.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Copyright (C) Viktor Szakats +# +# SPDX-License-Identifier: curl + +set -eu + +cd "$(dirname "${0}")"/../.. + +# shellcheck disable=SC2046 +codespell \ + --skip '.github/scripts/spellcheck.words' \ + --skip '.github/scripts/typos.toml' \ + --skip 'docs/THANKS' \ + --skip 'packages/*' \ + --skip 'scripts/wcurl' \ + --skip 'winbuild/*' \ + --ignore-regex '.*spellchecker:disable-line' \ + --ignore-words '.github/scripts/codespell-ignore.txt' \ + $(git ls-files) diff --git a/.github/scripts/typos.sh b/.github/scripts/typos.sh new file mode 100755 index 0000000000..76735c1d9f --- /dev/null +++ b/.github/scripts/typos.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright (C) Viktor Szakats +# +# SPDX-License-Identifier: curl + +set -eu + +cd "$(dirname "${0}")"/../.. + +git ls-files | typos \ + --isolated \ + --force-exclude \ + --config '.github/scripts/typos.toml' \ + --file-list - diff --git a/.github/scripts/typos.toml b/.github/scripts/typos.toml new file mode 100644 index 0000000000..46301615cd --- /dev/null +++ b/.github/scripts/typos.toml @@ -0,0 +1,29 @@ +# Copyright (C) Daniel Stenberg, , et al. +# +# SPDX-License-Identifier: curl + +[default] +extend-ignore-identifiers-re = [ + "^(ba|pn|PN|UE)$", + "^(CNA|ser)$", + "^(ECT0|ECT1|HELO|htpt|PASE)$", + "^[A-Za-z0-9_-]*(EDE|GOST)[A-Z0-9_-]*$", # ciphers + "^0x[0-9a-fA-F]+FUL$", # unsigned long hex literals ending with 'F' + "^[0-9a-zA-Z+]{64,}$", # possibly base64 + "^(Januar|eyeballers|HELO_smtp|kno22|MkTypLibCompatible|optin|passin|perfec|__SecURE|SMTP_HELO|v_alue)$", + "^(clen|req_clen|smtp_perform_helo|smtp_state_helo_resp|_stati64)$", +] + +extend-ignore-re = [ + ".*spellchecker:disable-line", +] + +[files] +extend-exclude = [ + ".github/scripts/codespell-ignore.txt", + ".github/scripts/spellcheck.words", + "docs/THANKS", + "packages/*", + "scripts/wcurl", + "winbuild/*", +] diff --git a/.github/workflows/checksrc.yml b/.github/workflows/checksrc.yml index dc93c19de7..1cb142c038 100644 --- a/.github/workflows/checksrc.yml +++ b/.github/workflows/checksrc.yml @@ -45,8 +45,8 @@ jobs: - name: 'check' run: scripts/checksrc-all.pl - codespell-cmakelint-pytype-ruff: - name: 'codespell, cmakelint, pytype, ruff' + spellcheck-cmakelint-pytype-ruff: + name: 'spellcheck, cmakelint, pytype, ruff' runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -61,20 +61,23 @@ jobs: sudo apt-get -o Dpkg::Use-Pty=0 update sudo rm -f /var/lib/man-db/auto-update sudo apt-get -o Dpkg::Use-Pty=0 install \ - codespell python3-pip python3-networkx python3-pydot python3-yaml \ + python3-pip python3-networkx python3-pydot python3-yaml \ python3-toml python3-markupsafe python3-jinja2 python3-tabulate \ python3-typing-extensions python3-libcst python3-impacket \ python3-websockets python3-pytest python3-filelock python3-pytest-xdist - python3 -m pip install --break-system-packages cmakelang==0.6.13 pytype==2024.10.11 ruff==0.11.9 + python3 -m pip install --break-system-packages cmakelang==0.6.13 pytype==2024.10.11 ruff==0.11.9 codespell==2.4.1 - - name: 'spellcheck' + - name: 'codespell' run: | - codespell \ - --skip scripts/mk-ca-bundle.pl \ - --skip src/tool_hugehelp.c \ - --skip scripts/wcurl \ - -I .github/scripts/codespell-ignore.txt \ - CMake include m4 scripts src lib + codespell --version + .github/scripts/codespell.sh + + - name: 'typos' + run: | + /home/linuxbrew/.linuxbrew/bin/brew install typos-cli + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + typos --version + .github/scripts/typos.sh - name: 'cmakelint' run: scripts/cmakelint.sh diff --git a/docs/examples/adddocsref.pl b/docs/examples/adddocsref.pl index 01be96a841..e2e2553dc5 100755 --- a/docs/examples/adddocsref.pl +++ b/docs/examples/adddocsref.pl @@ -36,9 +36,9 @@ for $f (@ARGV) { # just ignore preciously added refs } elsif($l =~ /^( *).*curl_easy_setopt\([^,]*, *([^ ,]*) *,/) { - my ($prefix, $anc) = ($1, $2); - $anc =~ s/_//g; - print NEW "$prefix/* $docroot/curl_easy_setopt.html#$anc */\n"; + my ($prefix, $anchor) = ($1, $2); + $anchor =~ s/_//g; + print NEW "$prefix/* $docroot/curl_easy_setopt.html#$anchor */\n"; print NEW $l; } elsif($l =~ /^( *).*(curl_([^\(]*))\(/) { diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c index 94080c641e..725002362d 100644 --- a/docs/examples/cacertinmem.c +++ b/docs/examples/cacertinmem.c @@ -41,7 +41,7 @@ static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream) return nmemb * size; } -static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) +static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer) { CURLcode rv = CURLE_ABORTED_BY_CALLBACK; @@ -93,8 +93,9 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) X509_STORE *cts = SSL_CTX_get_cert_store((SSL_CTX *)sslctx); int i; STACK_OF(X509_INFO) *inf; - (void)curl; - (void)parm; + + (void)curl; /* avoid warnings */ + (void)pointer; /* avoid warnings */ if(!cts || !cbio) { return rv; diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c index 2537486867..3748d68a05 100644 --- a/docs/examples/ftpuploadfrommem.c +++ b/docs/examples/ftpuploadfrommem.c @@ -31,7 +31,7 @@ static const char data[]= "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " - "Nam rhoncus odio id venenatis volutpat. Vestibulum dapibus " + "___ rhoncus odio id venenatis volutpat. Vestibulum dapibus " "bibendum ullamcorper. Maecenas finibus elit augue, vel " "condimentum odio maximus nec. In hac habitasse platea dictumst. " "Vestibulum vel dolor et turpis rutrum finibus ac at nulla. " diff --git a/docs/examples/httpput-postfields.c b/docs/examples/httpput-postfields.c index fdd6ffe0dd..5f410837b8 100644 --- a/docs/examples/httpput-postfields.c +++ b/docs/examples/httpput-postfields.c @@ -33,7 +33,7 @@ static const char olivertwist[]= "Among other public buildings in a certain town, which for many reasons " "it will be prudent to refrain from mentioning, and to which I will assign " "no fictitious name, there is one anciently common to most towns, great or " - "small: to wit, a workhouse; and in this workhouse was born; on a day and " + "small: to ___, a workhouse; and in this workhouse was born; on a day and " "date which I need not trouble myself to repeat, inasmuch as it can be of " "no possible consequence to the reader, in this stage of the business at " "all events; the item of mortality whose name is prefixed"; diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index 1a213cb2d5..fa0c575e65 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -33,9 +33,9 @@ static const char data[]="Lorem ipsum dolor sit amet, consectetur adipiscing " "elit. Sed vel urna neque. Ut quis leo metus. Quisque eleifend, ex at " "laoreet rhoncus, odio ipsum semper metus, at tempus ante urna in mauris. " - "Suspendisse ornare tempor venenatis. Ut dui neque, pellentesque a varius " + "Suspendisse ornare tempor venenatis. Ut dui neque, pellentesque a ______ " "eget, mattis vitae ligula. Fusce ut pharetra est. Ut ullamcorper mi ac " - "sollicitudin semper. Praesent sit amet tellus varius, posuere nulla non, " + "sollicitudin semper. Praesent sit amet tellus ______, posuere nulla non, " "rhoncus ipsum."; struct WriteThis { diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index f9c0a78d60..220dc62bcd 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -66,7 +66,7 @@ int main(void) #ifdef USE_ENGINE pKeyName = "rsa_test"; pKeyType = "ENG"; - pEngine = "chil"; /* for nChiper HSM... */ + pEngine = "chil"; /* for nCipher HSM... */ #else pKeyName = "testkey.pem"; pKeyType = "PEM"; diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c index 75fadfe8f6..027c036048 100644 --- a/docs/examples/usercertinmem.c +++ b/docs/examples/usercertinmem.c @@ -51,7 +51,7 @@ static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream) return nmemb * size; } -static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) +static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer) { X509 *cert = NULL; BIO *bio = NULL; @@ -124,7 +124,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) "-----END RSA PRIVATE KEY-----\n"; (void)curl; /* avoid warnings */ - (void)parm; /* avoid warnings */ + (void)pointer; /* avoid warnings */ /* get a BIO */ bio = BIO_new_mem_buf((char *)mypem, -1); diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4 index e89ab31dd7..4c89511f06 100644 --- a/docs/libcurl/libcurl.m4 +++ b/docs/libcurl/libcurl.m4 @@ -41,8 +41,8 @@ # values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are # the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy # where yyy are the various protocols supported by libcurl. Both xxx -# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of -# the macro for the complete list of possible defines. Shell +# and yyy are capitalized. See the list of AH_TEMPLATE macros at the top +# of the macro for the complete list of possible defines. Shell # variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also # defined to 'yes' for those features and protocols that were found. # Note that xxx and yyy keep the same capitalization as in the diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md index 683e03b618..81edea682d 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md @@ -49,12 +49,12 @@ NULL #include #include -static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) +static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer) { X509_STORE *store; X509 *cert = NULL; BIO *bio; - char *mypem = parm; + char *mypem = pointer; /* get a BIO */ bio = BIO_new_mem_buf(mypem, -1); /* use it to read the PEM formatted certificate from memory into an diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md index 43f819e6c2..ebf4c2ec3e 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md @@ -100,12 +100,12 @@ NULL #include #include -static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) +static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer) { X509_STORE *store; X509 *cert = NULL; BIO *bio; - char *mypem = parm; + char *mypem = pointer; /* get a BIO */ bio = BIO_new_mem_buf(mypem, -1); /* use it to read the PEM formatted certificate from memory into an diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md index 98289355c3..d80e38ed78 100644 --- a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md +++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md @@ -58,7 +58,7 @@ int main(void) if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "pop3://example.com/"); - curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "1ab9cb22ba269a7"); + curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "1ab9cb22bf269a7"); res = curl_easy_perform(curl); curl_easy_cleanup(curl); } diff --git a/include/curl/curl.h b/include/curl/curl.h index 7ef5b99349..f592c5c918 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -2750,7 +2750,7 @@ CURL_EXTERN CURLcode curl_global_init(long flags); * for each application that uses libcurl. This function can be used to * initialize libcurl and set user defined memory management callback * functions. Users can implement memory management routines to check for - * memory leaks, check for mis-use of the curl library etc. User registered + * memory leaks, check for misuse of the curl library etc. User registered * callback routines will be invoked by this library instead of the system * memory management routines like malloc, free etc. */ diff --git a/lib/asyn-thrdd.c b/lib/asyn-thrdd.c index 1ede868820..49daf2fd69 100644 --- a/lib/asyn-thrdd.c +++ b/lib/asyn-thrdd.c @@ -242,7 +242,7 @@ CURL_STDCALL getaddrinfo_thread(void *arg) #endif /* DNS has been resolved, signal client task */ if(wakeup_write(addr_ctx->sock_pair[1], buf, sizeof(buf)) < 0) { - /* update sock_erro to errno */ + /* update sock_error to errno */ addr_ctx->sock_error = SOCKERRNO; } } diff --git a/lib/curlx/dynbuf.c b/lib/curlx/dynbuf.c index 0b8dfe8e34..cd4f4635a6 100644 --- a/lib/curlx/dynbuf.c +++ b/lib/curlx/dynbuf.c @@ -71,14 +71,14 @@ void curlx_dyn_free(struct dynbuf *s) static CURLcode dyn_nappend(struct dynbuf *s, const unsigned char *mem, size_t len) { - size_t indx = s->leng; + size_t idx = s->leng; size_t a = s->allc; - size_t fit = len + indx + 1; /* new string + old string + zero byte */ + size_t fit = len + idx + 1; /* new string + old string + zero byte */ /* try to detect if there is rubbish in the struct */ DEBUGASSERT(s->init == DYNINIT); DEBUGASSERT(s->toobig); - DEBUGASSERT(indx < s->toobig); + DEBUGASSERT(idx < s->toobig); DEBUGASSERT(!s->leng || s->bufr); DEBUGASSERT(a <= s->toobig); DEBUGASSERT(!len || mem); @@ -88,7 +88,7 @@ static CURLcode dyn_nappend(struct dynbuf *s, return CURLE_TOO_LARGE; } else if(!a) { - DEBUGASSERT(!indx); + DEBUGASSERT(!idx); /* first invoke */ if(MIN_FIRST_ALLOC > s->toobig) a = s->toobig; @@ -118,8 +118,8 @@ static CURLcode dyn_nappend(struct dynbuf *s, } if(len) - memcpy(&s->bufr[indx], mem, len); - s->leng = indx + len; + memcpy(&s->bufr[idx], mem, len); + s->leng = idx + len; s->bufr[s->leng] = 0; return CURLE_OK; } diff --git a/lib/curlx/inet_ntop.c b/lib/curlx/inet_ntop.c index e5ff45cb1b..3f8bcbf366 100644 --- a/lib/curlx/inet_ntop.c +++ b/lib/curlx/inet_ntop.c @@ -54,7 +54,7 @@ * * Returns `dst' (as a const) * Note: - * - uses no statics + * - uses no static variables * - takes an unsigned char* not an in_addr as input */ static char *inet_ntop4(const unsigned char *src, char *dst, size_t size) diff --git a/lib/curlx/timeval.c b/lib/curlx/timeval.c index 501bf9c3fd..a767d1ac72 100644 --- a/lib/curlx/timeval.c +++ b/lib/curlx/timeval.c @@ -172,7 +172,7 @@ struct curltime curlx_now(void) (void) mach_timebase_info(&timebase); usecs = mach_absolute_time(); - usecs *= timebase.numer; + usecs *= timebase.numer; /* spellchecker:disable-line */ usecs /= timebase.denom; usecs /= 1000; diff --git a/lib/ftp.c b/lib/ftp.c index 06c486bc91..4a1e3d6421 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2067,7 +2067,7 @@ static CURLcode client_write_header(struct Curl_easy *data, * the body write callback when data->set.include_header is set * via CURLOPT_HEADER. * For historic reasons, FTP never played this game and expects - * all its HEADERs to do that always. Set that flag during the + * all its headers to do that always. Set that flag during the * call to Curl_client_write() so it does the right thing. * * Notice that we cannot enable this flag for FTP in general, diff --git a/lib/hostip4.c b/lib/hostip4.c index 14e4d98a86..627edbecd4 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -145,7 +145,7 @@ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, return NULL; /* major failure */ /* * The clearing of the buffer is a workaround for a gethostbyname_r bug in - * qnx nto and it is also _required_ for some of these functions on some + * QNX Neutrino and it is also _required_ for some of these functions on some * platforms. */ diff --git a/lib/http2.c b/lib/http2.c index 36dca426de..2d7a571d10 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -2348,7 +2348,7 @@ static CURLcode cf_h2_send(struct Curl_cfilter *cf, struct Curl_easy *data, DEBUGASSERT(stream); } else if(stream->body_eos) { - /* We already wrote this, but CURLE_AGAINed the call due to not + /* We already wrote this, but CURLE_AGAIN-ed the call due to not * being able to flush stream->sendbuf. Make a 0-length write * to trigger flushing again. * If this works, we report to have written `len` bytes. */ diff --git a/lib/parsedate.c b/lib/parsedate.c index 65730d6c99..eedab7c411 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -150,7 +150,7 @@ static const struct tzinfo tz[]= { {"HDT", 600 tDAYZONE}, /* Hawaii Daylight */ {"CAT", 600}, /* Central Alaska */ {"AHST", 600}, /* Alaska-Hawaii Standard */ - {"NT", 660}, /* Nome */ + {"NT", 660}, /* Nome */ /* spellchecker:disable-line */ {"IDLW", 720}, /* International Date Line West */ {"CET", -60}, /* Central European */ {"MET", -60}, /* Middle European */ @@ -161,7 +161,8 @@ static const struct tzinfo tz[]= { {"FWT", -60}, /* French Winter */ {"FST", -60 tDAYZONE}, /* French Summer */ {"EET", -120}, /* Eastern Europe, USSR Zone 1 */ - {"WAST", -420}, /* West Australian Standard */ + {"WAST", -420}, /* spellchecker:disable-line */ + /* West Australian Standard */ {"WADT", -420 tDAYZONE}, /* West Australian Daylight */ {"CCT", -480}, /* China Coast, USSR Zone 7 */ {"JST", -540}, /* Japan Standard, USSR Zone 8 */ diff --git a/lib/url.c b/lib/url.c index e4f250f54a..3d78ceeed5 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3717,7 +3717,7 @@ static CURLcode create_conn(struct Curl_easy *data, *in_connect = conn; #ifndef CURL_DISABLE_PROXY - infof(data, "Re-using existing %s: connection%s with %s %s", + infof(data, "Reusing existing %s: connection%s with %s %s", conn->given->scheme, tls_upgraded ? " (upgraded to SSL)" : "", conn->bits.proxy ? "proxy" : "host", @@ -3725,7 +3725,7 @@ static CURLcode create_conn(struct Curl_easy *data, conn->http_proxy.host.name ? conn->http_proxy.host.dispname : conn->host.dispname); #else - infof(data, "Re-using existing %s: connection%s with host %s", + infof(data, "Reusing existing %s: connection%s with host %s", conn->given->scheme, tls_upgraded ? " (upgraded to SSL)" : "", conn->host.dispname); diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index 69d54ecce2..7584d0a47a 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -155,7 +155,7 @@ struct cf_ngtcp2_ctx { BIT(initialized); BIT(tls_handshake_complete); /* TLS handshake is done */ BIT(use_earlydata); /* Using 0RTT data */ - BIT(earlydata_accepted); /* 0RTT was acceptd by server */ + BIT(earlydata_accepted); /* 0RTT was accepted by server */ BIT(shutdown_started); /* queued shutdown packets */ }; diff --git a/lib/vquic/curl_osslq.c b/lib/vquic/curl_osslq.c index 90fed6c44f..477e883e6a 100644 --- a/lib/vquic/curl_osslq.c +++ b/lib/vquic/curl_osslq.c @@ -159,11 +159,11 @@ static char *osslq_strerror(unsigned long error, char *buf, size_t size) static CURLcode make_bio_addr(BIO_ADDR **pbio_addr, const struct Curl_sockaddr_ex *addr) { - BIO_ADDR *ba; + BIO_ADDR *bio_addr; CURLcode result = CURLE_FAILED_INIT; - ba = BIO_ADDR_new(); - if(!ba) { + bio_addr = BIO_ADDR_new(); + if(!bio_addr) { result = CURLE_OUT_OF_MEMORY; goto out; } @@ -172,7 +172,7 @@ static CURLcode make_bio_addr(BIO_ADDR **pbio_addr, case AF_INET: { struct sockaddr_in * const sin = (struct sockaddr_in * const)CURL_UNCONST(&addr->curl_sa_addr); - if(!BIO_ADDR_rawmake(ba, AF_INET, &sin->sin_addr, + if(!BIO_ADDR_rawmake(bio_addr, AF_INET, &sin->sin_addr, sizeof(sin->sin_addr), sin->sin_port)) { goto out; } @@ -183,7 +183,7 @@ static CURLcode make_bio_addr(BIO_ADDR **pbio_addr, case AF_INET6: { struct sockaddr_in6 * const sin = (struct sockaddr_in6 * const)CURL_UNCONST(&addr->curl_sa_addr); - if(!BIO_ADDR_rawmake(ba, AF_INET6, &sin->sin6_addr, + if(!BIO_ADDR_rawmake(bio_addr, AF_INET6, &sin->sin6_addr, sizeof(sin->sin6_addr), sin->sin6_port)) { } result = CURLE_OK; @@ -197,11 +197,11 @@ static CURLcode make_bio_addr(BIO_ADDR **pbio_addr, } out: - if(result && ba) { - BIO_ADDR_free(ba); - ba = NULL; + if(result && bio_addr) { + BIO_ADDR_free(bio_addr); + bio_addr = NULL; } - *pbio_addr = ba; + *pbio_addr = bio_addr; return result; } diff --git a/lib/vtls/cipher_suite.c b/lib/vtls/cipher_suite.c index cefc92c580..9819ed58ee 100644 --- a/lib/vtls/cipher_suite.c +++ b/lib/vtls/cipher_suite.c @@ -70,7 +70,7 @@ static const char *cs_txt = "ECDH" "\0" "ECDHE" "\0" "ECDSA" "\0" - "EDE" "\0" + "EDE" "\0" /* spellchecker:disable-line */ "GCM" "\0" "MD5" "\0" "NULL" "\0" @@ -111,7 +111,7 @@ enum { CS_TXT_IDX_ECDH, CS_TXT_IDX_ECDHE, CS_TXT_IDX_ECDSA, - CS_TXT_IDX_EDE, + CS_TXT_IDX_EDE, /* spellchecker:disable-line */ CS_TXT_IDX_GCM, CS_TXT_IDX_MD5, CS_TXT_IDX_NULL, diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 064f980a1b..d47365c0b5 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1516,7 +1516,7 @@ int cert_stuff(struct Curl_easy *data, goto fail; } - if(!SSL_CTX_check_private_key (ctx)) { + if(!SSL_CTX_check_private_key(ctx)) { failf(data, "private key from PKCS12 file '%s' " "does not match certificate in same file", cert_file); goto fail; diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 2ac61ba794..8d16d70392 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -286,7 +286,7 @@ static const struct algo algs[]= { #ifdef CALG_TEK CIPHEROPTION(CALG_TEK), #endif - CIPHEROPTION(CALG_CYLINK_MEK), + CIPHEROPTION(CALG_CYLINK_MEK), /* spellchecker:disable-line */ CIPHEROPTION(CALG_SSL3_SHAMD5), #ifdef CALG_SSL3_MASTER CIPHEROPTION(CALG_SSL3_MASTER), diff --git a/lib/vtls/schannel_int.h b/lib/vtls/schannel_int.h index 511a852c7a..cc478e4174 100644 --- a/lib/vtls/schannel_int.h +++ b/lib/vtls/schannel_int.h @@ -83,7 +83,7 @@ typedef struct _CRYPTO_SETTINGS { eTlsAlgorithmUsage eAlgorithmUsage; UNICODE_STRING strCngAlgId; DWORD cChainingModes; - PUNICODE_STRING rgstrChainingModes; + PUNICODE_STRING rgstrChainingModes; /* spellchecker:disable-line */ DWORD dwMinBitLength; DWORD dwMaxBitLength; } CRYPTO_SETTINGS, * PCRYPTO_SETTINGS; @@ -91,7 +91,7 @@ typedef struct _CRYPTO_SETTINGS { /* !checksrc! disable TYPEDEFSTRUCT 1 */ typedef struct _TLS_PARAMETERS { DWORD cAlpnIds; - PUNICODE_STRING rgstrAlpnIds; + PUNICODE_STRING rgstrAlpnIds; /* spellchecker:disable-line */ DWORD grbitDisabledProtocols; DWORD cDisabledCrypto; PCRYPTO_SETTINGS pDisabledCrypto; diff --git a/lib/vtls/wolfssl.h b/lib/vtls/wolfssl.h index 19ca609c84..7ff4cfb881 100644 --- a/lib/vtls/wolfssl.h +++ b/lib/vtls/wolfssl.h @@ -44,7 +44,7 @@ struct wssl_ctx { struct WOLFSSL *ssl; CURLcode io_result; /* result of last BIO cfilter operation */ CURLcode hs_result; /* result of handshake */ - int io_send_blocked_len; /* length of last BIO write that EAGAINed */ + int io_send_blocked_len; /* length of last BIO write that EAGAIN-ed */ BIT(x509_store_setup); /* x509 store has been set up */ BIT(shutting_down); /* TLS is being shut down */ }; diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in index 7aff9e37a8..1fe5b07ebe 100644 --- a/packages/OS400/curl.inc.in +++ b/packages/OS400/curl.inc.in @@ -2202,7 +2202,7 @@ d CURLMOPT_MAX_CONCURRENT_STREAMS... d c 10016 * - * Bitmask bits for CURLMOPT_PIPELING. + * Bitmask bits for CURLMOPT_PIPELINING. * d CURLPIPE_NOTHING... d c x'00000000' diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com index 1667d0745c..1902b0c215 100644 --- a/packages/vms/build_curl-config_script.com +++ b/packages/vms/build_curl-config_script.com @@ -120,7 +120,7 @@ $ i = 0 $ line_out = "" $sub_loop: $ ! Replace between pairs of @ by alternating the elements. -$ ! If mis-matched pairs, do not substitute anything. +$ ! If mismatched pairs, do not substitute anything. $ section1 = f$element(i, "@", line_in) $ if section1 .eqs. "@" $ then diff --git a/src/tool_formparse.c b/src/tool_formparse.c index e322f8ddd2..f93ba03bfc 100644 --- a/src/tool_formparse.c +++ b/src/tool_formparse.c @@ -345,7 +345,7 @@ CURLcode tool2curlmime(CURL *curl, struct tool_mime *m, curl_mime **mime) /* * helper function to get a word from form param - * after call get_parm_word, str either point to string end + * after call get_param_word, str either point to string end * or point to any of end chars. */ static char *get_param_word(struct OperationConfig *config, char **str, diff --git a/src/tool_setopt.c b/src/tool_setopt.c index 89505979c9..48fc4e8e37 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -497,8 +497,7 @@ static CURLcode libcurl_generate_mime_part(CURL *curl, "curl_mime_headers(part%d, slist%d, 1);", mimeno, slistno); if(!ret) - ret = easysrc_addf(&easysrc_code, - "slist%d = NULL;", slistno); /* Prevent CLEANing. */ + ret = easysrc_addf(&easysrc_code, "slist%d = NULL;", slistno); } } diff --git a/tests/client/h2_upgrade_extreme.c b/tests/client/h2_upgrade_extreme.c index 2b15157417..46ab7edfc6 100644 --- a/tests/client/h2_upgrade_extreme.c +++ b/tests/client/h2_upgrade_extreme.c @@ -23,7 +23,8 @@ ***************************************************************************/ #include "first.h" -static size_t write_h2ue_cb(char *ptr, size_t size, size_t nmemb, void *opaque) +static size_t write_h2_upg_extreme_cb(char *ptr, size_t size, size_t nmemb, + void *opaque) { (void)ptr; (void)opaque; @@ -69,7 +70,7 @@ static int test_h2_upgrade_extreme(int argc, char *argv[]) curl_easy_setopt(easy, CURLOPT_AUTOREFERER, 1L); curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1L); curl_easy_setopt(easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); - curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, write_h2ue_cb); + curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, write_h2_upg_extreme_cb); curl_easy_setopt(easy, CURLOPT_WRITEDATA, NULL); curl_easy_setopt(easy, CURLOPT_HTTPGET, 1L); curl_msnprintf(range, sizeof(range), @@ -116,7 +117,7 @@ static int test_h2_upgrade_extreme(int argc, char *argv[]) if(msg->data.result == CURLE_SEND_ERROR || msg->data.result == CURLE_RECV_ERROR) { /* We get these if the server had a GOAWAY in transit on - * re-using a connection */ + * reusing a connection */ } else if(msg->data.result) { curl_mfprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T diff --git a/tests/client/tls_session_reuse.c b/tests/client/tls_session_reuse.c index 4e69383f60..fd145d62d9 100644 --- a/tests/client/tls_session_reuse.c +++ b/tests/client/tls_session_reuse.c @@ -201,7 +201,7 @@ static int test_tls_session_reuse(int argc, char *argv[]) if(msg->data.result == CURLE_SEND_ERROR || msg->data.result == CURLE_RECV_ERROR) { /* We get these if the server had a GOAWAY in transit on - * re-using a connection */ + * reusing a connection */ } else if(msg->data.result) { curl_mfprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T diff --git a/tests/data/test1233 b/tests/data/test1233 index 0ca5eed97f..7b59c8ed47 100644 --- a/tests/data/test1233 +++ b/tests/data/test1233 @@ -10,7 +10,7 @@ connect to non-listen # Assuming there's nothing listening on port 1 -REPLY EPSV 229 Entering Passiv Mode (|||1|) +REPLY EPSV 229 Entering Passive Mode (|||1|) here are some bytes diff --git a/tests/data/test1294 b/tests/data/test1294 index 17562fe678..58e2d379e0 100644 --- a/tests/data/test1294 +++ b/tests/data/test1294 @@ -44,7 +44,7 @@ HTTP GET with split initial request send CURL_SMALLREQSEND=128 -http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER -H "Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to wit, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511" +http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER -H "Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to ___, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511" @@ -56,7 +56,7 @@ GET /012345679012345679012345679012345679012345679012345679012345679012345679012 Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Accept: */* -Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to wit, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511 +Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to ___, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511 diff --git a/tests/data/test1328 b/tests/data/test1328 index 8466abde67..e913e19cea 100644 --- a/tests/data/test1328 +++ b/tests/data/test1328 @@ -15,7 +15,7 @@ Date: Tue, 09 Nov 2010 14:49:00 GMT Content-Length: 6 Funny-head: yesyes --noo- +-nooo- HTTP/1.1 200 OK diff --git a/tests/data/test1421 b/tests/data/test1421 index d62adfb046..6c36eb1916 100644 --- a/tests/data/test1421 +++ b/tests/data/test1421 @@ -30,7 +30,7 @@ connection-monitor http -Re-using HTTP proxy connection for two different host names +Reusing HTTP proxy connection for two different host names --proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:8990/ http://different.remote.haxx.se.%TESTNUMBER:8990 diff --git a/tests/data/test153 b/tests/data/test153 index 6dfaf6e405..a38cce6fa9 100644 --- a/tests/data/test153 +++ b/tests/data/test153 @@ -116,7 +116,7 @@ Accept: */* GET /%TESTNUMBER0002 HTTP/1.1 Host: %HOSTIP:%HTTPPORT -Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5 +Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIr", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5 User-Agent: curl/%VERSION Accept: */* diff --git a/tests/data/test167 b/tests/data/test167 index 0826239623..7221e3c323 100644 --- a/tests/data/test167 +++ b/tests/data/test167 @@ -52,7 +52,7 @@ digest HTTP with proxy-requiring-Basic to site-requiring-Digest -http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot +http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:a-lot @@ -69,7 +69,7 @@ Proxy-Connection: Keep-Alive GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 Host: data.from.server.requiring.digest.hohoho.com Proxy-Authorization: Basic %b64[foo:bar]b64% -Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="13c7c02a252cbe1c46d8669898a3be26" +Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="304c55b19dbcb9c7e7a3354abd11ba1b" User-Agent: curl/%VERSION Accept: */* Proxy-Connection: Keep-Alive diff --git a/tests/data/test168 b/tests/data/test168 index 94e3ec4c1e..db4473ce98 100644 --- a/tests/data/test168 +++ b/tests/data/test168 @@ -66,7 +66,7 @@ digest HTTP with proxy-requiring-Digest to site-requiring-Digest -http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-digest --digest --user digest:alot +http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-digest --digest --user digest:a-lot @@ -89,7 +89,7 @@ Proxy-Connection: Keep-Alive GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 Host: data.from.server.requiring.digest.hohoho.com Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="fb8608e00ad9239a3dedb14bc8575976" -Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="ca87f2d768a231e2d637a55698d5c416" +Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="bfecb43898f3db12543650d45493313b" User-Agent: curl/%VERSION Accept: */* Proxy-Connection: Keep-Alive diff --git a/tests/data/test169 b/tests/data/test169 index 3e66ee481e..8a2bb108a9 100644 --- a/tests/data/test169 +++ b/tests/data/test169 @@ -87,7 +87,7 @@ digest HTTP with proxy-requiring-NTLM to site-requiring-Digest -http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot +http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:a-lot @@ -110,7 +110,7 @@ Proxy-Connection: Keep-Alive GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 Host: data.from.server.requiring.digest.hohoho.com -Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/%TESTNUMBER", response="95d48591985a03c4b49cb962aa7bd3e6" +Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/%TESTNUMBER", response="89b737a4b6eefde285c093c92e9bd6ea" User-Agent: curl/%VERSION Accept: */* Proxy-Connection: Keep-Alive diff --git a/tests/data/test174 b/tests/data/test174 index a3d1d080aa..399164425d 100644 --- a/tests/data/test174 +++ b/tests/data/test174 @@ -9,7 +9,7 @@ HTTP POST # Server-side -HTTP/1.1 200 beng swsclose +HTTP/1.1 200 foobar swsclose Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 diff --git a/tests/data/test175 b/tests/data/test175 index ed6928ce92..2af0a9b843 100644 --- a/tests/data/test175 +++ b/tests/data/test175 @@ -10,7 +10,7 @@ HTTP Digest auth # Server-side -HTTP/1.1 200 beng swsclose swsbounce +HTTP/1.1 200 foobar swsclose swsbounce Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 @@ -28,7 +28,7 @@ content for you -HTTP/1.1 200 beng swsclose swsbounce +HTTP/1.1 200 foobar swsclose swsbounce Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 diff --git a/tests/data/test176 b/tests/data/test176 index 0eab979c90..f86fa7f677 100644 --- a/tests/data/test176 +++ b/tests/data/test176 @@ -11,7 +11,7 @@ HTTP NTLM auth # the first request has NTLM type-1 included, and then the 1001 is returned -HTTP/1.1 200 beng swsclose +HTTP/1.1 200 foobar swsclose Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 @@ -29,7 +29,7 @@ content for you -HTTP/1.1 200 beng swsclose +HTTP/1.1 200 foobar swsclose Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 diff --git a/tests/data/test237 b/tests/data/test237 index 9e68651189..010f4f4322 100644 --- a/tests/data/test237 +++ b/tests/data/test237 @@ -8,7 +8,7 @@ FTP # Server-side -REPLY PASV 227 Entering Passiv Mode (1216,256,2,127,127,127) +REPLY PASV 227 Entering Passive Mode (1216,256,2,127,127,127) diff --git a/tests/data/test238 b/tests/data/test238 index 71b46ddc36..3173237eb7 100644 --- a/tests/data/test238 +++ b/tests/data/test238 @@ -8,7 +8,7 @@ FTP # Server-side -REPLY EPSV 229 Entering Passiv Mode (|||1000000|) +REPLY EPSV 229 Entering Passive Mode (|||1000000|) diff --git a/tests/data/test2720 b/tests/data/test2720 index 1f4622632b..e70ecd324b 100644 --- a/tests/data/test2720 +++ b/tests/data/test2720 @@ -33,9 +33,9 @@ upgrade # Full list of frames: see below -# 1st a message with an emtpy fragment at the beginning -# 2nd a message with an emtpy fragment in the middle -# 3rd a message with an emtpy fragment at the end +# 1st a message with an empty fragment at the beginning +# 2nd a message with an empty fragment in the middle +# 3rd a message with an empty fragment at the end # 4th a message with only empty fragments HTTP/1.1 101 Switching to WebSockets diff --git a/tests/data/test335 b/tests/data/test335 index 2101d4f290..327296df32 100644 --- a/tests/data/test335 +++ b/tests/data/test335 @@ -68,7 +68,7 @@ digest HTTP with proxy Digest and site Digest with creds in URLs -http://digest:alot@data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest +http://digest:a-lot@data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest @@ -91,7 +91,7 @@ Proxy-Connection: Keep-Alive GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 Host: data.from.server.requiring.digest.hohoho.com Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb" -Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="08a2e2e684047f4219a38ddc189ac00c" +Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="ea0f4cb7a119a1a6f6c6c6c2e4190860" User-Agent: curl/%VERSION Accept: */* Proxy-Connection: Keep-Alive diff --git a/tests/data/test383 b/tests/data/test383 index bb8cb666d1..2094460db3 100644 --- a/tests/data/test383 +++ b/tests/data/test383 @@ -35,7 +35,7 @@ http HTTP with --json ---json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER +--json '{ "drink": "coffee" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER @@ -48,9 +48,9 @@ Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Content-Type: application/json Accept: application/json -Content-Length: 20 +Content-Length: 21 -{ "drink": "coffe" } +{ "drink": "coffee" } diff --git a/tests/data/test384 b/tests/data/test384 index 6148ef40d4..50f94c009c 100644 --- a/tests/data/test384 +++ b/tests/data/test384 @@ -35,7 +35,7 @@ http HTTP with --json from stdin -{ "drink": "coffe" } +{ "drink": "coffee" } --json @- http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Accept: foobar/*" @@ -51,9 +51,9 @@ Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Accept: foobar/* Content-Type: application/json -Content-Length: 21 +Content-Length: 22 -{ "drink": "coffe" } +{ "drink": "coffee" } diff --git a/tests/data/test385 b/tests/data/test385 index b2e3c4d8c0..c28a9f08f6 100644 --- a/tests/data/test385 +++ b/tests/data/test385 @@ -35,7 +35,7 @@ http HTTP with --json x 2 ---json '{ "drink": "coffe",' --json ' "crunch": "cookie" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Content-Type: drinks/hot" +--json '{ "drink": "coffee",' --json ' "crunch": "cookie" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Content-Type: drinks/hot" @@ -48,9 +48,9 @@ Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Content-Type: drinks/hot Accept: application/json -Content-Length: 40 +Content-Length: 41 -{ "drink": "coffe", "crunch": "cookie" } +{ "drink": "coffee", "crunch": "cookie" } diff --git a/tests/data/test386 b/tests/data/test386 index ed20f5e453..c49d75b2aa 100644 --- a/tests/data/test386 +++ b/tests/data/test386 @@ -49,7 +49,7 @@ http HTTP with --json + --next ---json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 +--json '{ "drink": "coffee" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 @@ -62,9 +62,9 @@ Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Content-Type: application/json Accept: application/json -Content-Length: 20 +Content-Length: 21 -{ "drink": "coffe" }GET /%TESTNUMBER0002 HTTP/1.1 +{ "drink": "coffee" }GET /%TESTNUMBER0002 HTTP/1.1 Host: %HOSTIP:%HTTPPORT User-Agent: curl/%VERSION Accept: */* diff --git a/tests/data/test388 b/tests/data/test388 index aee2063e45..23a5cc7c42 100644 --- a/tests/data/test388 +++ b/tests/data/test388 @@ -116,7 +116,7 @@ Accept: */* GET /%TESTNUMBER0002 HTTP/1.1 Host: %HOSTIP:%HTTPPORT -Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5 +Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIr", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5 User-Agent: curl/%VERSION Accept: */* diff --git a/tests/data/test540 b/tests/data/test540 index 308d5b3397..977996a2fa 100644 --- a/tests/data/test540 +++ b/tests/data/test540 @@ -71,7 +71,7 @@ proxy digest -HTTP proxy auth Digest multi API re-using connection +HTTP proxy auth Digest multi API reusing connection http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name diff --git a/tests/data/test804 b/tests/data/test804 index 420dfb70c6..9d6c7e94e9 100644 --- a/tests/data/test804 +++ b/tests/data/test804 @@ -25,7 +25,7 @@ body imap -IMAP doesn't perform SELECT if re-using the same mailbox +IMAP doesn't perform SELECT if reusing the same mailbox 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=456/;SECTION=2.3' -u user:secret diff --git a/tests/data/test845 b/tests/data/test845 index b03cd315cf..c9cae6d65a 100644 --- a/tests/data/test845 +++ b/tests/data/test845 @@ -16,7 +16,7 @@ RFC7628 AUTH OAUTHBEARER CAPA SASL-IR -REPLY AUTHENTICATE + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0= +REPLY AUTHENTICATE + %b64[{"status":"invalid_token","scope":"example_scope","openid-configuration":"https://example.com/.well-known/openid-configuration"}]b64% REPLY AQ== A002 NO Authentication failed diff --git a/tests/data/test889 b/tests/data/test889 index 5abba0e4ed..36d0e32d1f 100644 --- a/tests/data/test889 +++ b/tests/data/test889 @@ -17,7 +17,7 @@ RFC7628 AUTH OAUTHBEARER REPLY AUTH + -REPLY %b64[n,a=user,%01host=127.0.0.1%01port=%POP3PORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY %b64[n,a=user,%01host=127.0.0.1%01port=%POP3PORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% + %b64[{"status":"invalid_token","scope":"example_scope","openid-configuration":"https://example.com/.well-known/openid-configuration"}]b64% REPLY AQ== -ERR Authentication failed diff --git a/tests/data/test890 b/tests/data/test890 index 2c396143aa..70ac504597 100644 --- a/tests/data/test890 +++ b/tests/data/test890 @@ -17,7 +17,7 @@ RFC7628 AUTH OAUTHBEARER -REPLY AUTH + eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY AUTH + %b64[{"status":"invalid_token","scope":"example_scope","openid-configuration":"https://example.com/.well-known/openid-configuration"}]b64% REPLY AQ== -ERR Authentication failed diff --git a/tests/data/test948 b/tests/data/test948 index a765fba3d9..9b6aefdc63 100644 --- a/tests/data/test948 +++ b/tests/data/test948 @@ -16,7 +16,7 @@ RFC7628 AUTH OAUTHBEARER REPLY AUTH 334 OAUTHBEARER supported -REPLY %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% 334 eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% 334 %b64[{"status":"invalid_token","scope":"example_scope","openid-configuration":"https://example.com/.well-known/openid-configuration"}]b64% REPLY AQ== 535 Username and Password not accepted. Learn more at\r\n535 http://support.example.com/mail/oauth diff --git a/tests/data/test949 b/tests/data/test949 index 136baf4efa..0a6be43b37 100644 --- a/tests/data/test949 +++ b/tests/data/test949 @@ -16,7 +16,7 @@ RFC7628 AUTH OAUTHBEARER -REPLY AUTH 334 eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0 +REPLY AUTH 334 %b64[{"status":"invalid_token","scope":"example_scope","openid-configuration":"https://example.com/.well-known/openid-configuration"}]b64% REPLY AQ== 535 Username and Password not accepted. Learn more at\r\n535 http://support.example.com/mail/oauth diff --git a/tests/data/test998 b/tests/data/test998 index cecc952856..c3594913d4 100644 --- a/tests/data/test998 +++ b/tests/data/test998 @@ -62,7 +62,7 @@ http HTTP with auth in URL redirected to another host --x %HOSTIP:%HTTPPORT http://alberto:einstein@somwhere.example/%TESTNUMBER --location-trusted +-x %HOSTIP:%HTTPPORT http://alberto:einstein@somewhere.example/%TESTNUMBER --location-trusted @@ -73,8 +73,8 @@ HTTP with auth in URL redirected to another host QUIT -GET http://somwhere.example/998 HTTP/1.1 -Host: somwhere.example +GET http://somewhere.example/998 HTTP/1.1 +Host: somewhere.example Authorization: Basic %b64[alberto:einstein]b64% User-Agent: curl/%VERSION Accept: */* diff --git a/tests/data/test999 b/tests/data/test999 index e46c2ad51b..4f5fafe6f8 100644 --- a/tests/data/test999 +++ b/tests/data/test999 @@ -52,7 +52,7 @@ http HTTP with auth in first URL but not second --x %HOSTIP:%HTTPPORT http://alberto:einstein@somwhere.example/%TESTNUMBER http://somewhere.else.example/%TESTNUMBER +-x %HOSTIP:%HTTPPORT http://alberto:einstein@somewhere.example/%TESTNUMBER http://somewhere.else.example/%TESTNUMBER @@ -63,8 +63,8 @@ HTTP with auth in first URL but not second QUIT -GET http://somwhere.example/%TESTNUMBER HTTP/1.1 -Host: somwhere.example +GET http://somewhere.example/%TESTNUMBER HTTP/1.1 +Host: somewhere.example Authorization: Basic %b64[alberto:einstein]b64% User-Agent: curl/%VERSION Accept: */* diff --git a/tests/ech_tests.sh b/tests/ech_tests.sh index a0512e0305..ce0b4870e8 100755 --- a/tests/ech_tests.sh +++ b/tests/ech_tests.sh @@ -292,11 +292,11 @@ then digcmd="kdig @$DOHSERVER +https +short" fi # see if our dig version knows HTTPS -dout=$($digcmd https defo.ie) -if [[ $dout != "1 . "* ]] +digout=$($digcmd https defo.ie) +if [[ $digout != "1 . "* ]] then - dout=$($digcmd -t TYPE65 defo.ie) - if [[ $dout == "1 . "* ]] + digout=$($digcmd -t TYPE65 defo.ie) + if [[ $digout == "1 . "* ]] then # we're good have_presout="yes" @@ -337,7 +337,7 @@ echo "curl: have $have_curl, cURL command: |$CURL ${CURL_PARAMS[*]}|" echo "ossl: have: $have_ossl, using: $using_ossl" echo "wolf: have: $have_wolf, using: $using_wolf" echo "bssl: have: $have_bssl, using: $using_bssl" -echo "dig: $have_dig, kdig: $have_kdig, HTTPS pres format: $have_presout" +echo "dig: $have_dig, kdig: $have_kdig, HTTPS presentation format: $have_presout" echo "dig command: |$digcmd|" echo "ports != 443 blocked: $have_portsblocked" diff --git a/tests/http/test_10_proxy.py b/tests/http/test_10_proxy.py index 2343bc5731..8116a52e58 100644 --- a/tests/http/test_10_proxy.py +++ b/tests/http/test_10_proxy.py @@ -235,7 +235,7 @@ class TestProxy: @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL") @pytest.mark.parametrize("tunnel", ['http/1.1', 'h2']) @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available") - def test_10_09_reuse_ser(self, env: Env, httpd, nghttpx_fwd, tunnel): + def test_10_09_reuse_server(self, env: Env, httpd, nghttpx_fwd, tunnel): if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'): pytest.skip('only supported with nghttp2') curl = CurlClient(env=env) diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 947283ba8b..c2ade6da48 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -1244,7 +1244,7 @@ static const struct redircase set_url_list[] = { "file:///basic?hello#frag", 0, 0, CURLUE_OK}, {"file:///basic?hello", "?q", "file:///basic?q", 0, 0, CURLUE_OK}, - {"http://example.org#withs/ash", "/moo#frag", + {"http://example.org#without/ash", "/moo#frag", "http://example.org/moo#frag", 0, 0, CURLUE_OK}, {"http://example.org/", "../path/././../././../moo", diff --git a/tests/libtest/lib3026.c b/tests/libtest/lib3026.c index fb50b97e53..781d9cfb8b 100644 --- a/tests/libtest/lib3026.c +++ b/tests/libtest/lib3026.c @@ -50,7 +50,7 @@ static CURLcode test_lib3026(char *URL) typedef uintptr_t curl_win_thread_handle_t; #endif CURLcode results[NUM_THREADS]; - curl_win_thread_handle_t ths[NUM_THREADS]; + curl_win_thread_handle_t thread_handles[NUM_THREADS]; unsigned tid_count = NUM_THREADS, i; CURLcode test_failure = CURLE_OK; curl_version_info_data *ver; @@ -79,13 +79,13 @@ static CURLcode test_lib3026(char *URL) test_failure = TEST_ERR_MAJOR_BAD; goto cleanup; } - ths[i] = th; + thread_handles[i] = th; } cleanup: for(i = 0; i < tid_count; i++) { - WaitForSingleObject((HANDLE)ths[i], INFINITE); - CloseHandle((HANDLE)ths[i]); + WaitForSingleObject((HANDLE)thread_handles[i], INFINITE); + CloseHandle((HANDLE)thread_handles[i]); if(results[i] != CURLE_OK) { curl_mfprintf(stderr, "%s:%d thread[%u]: curl_global_init() failed," "with code %d (%s)\n", __FILE__, __LINE__, diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c index 4d3dede6ca..097f4845c0 100644 --- a/tests/libtest/lib557.c +++ b/tests/libtest/lib557.c @@ -1146,7 +1146,7 @@ static int test_string_formatting(void) errors += string_check(buf, "09foo"); curl_msnprintf(buf, sizeof(buf), "%*.*s", 5, 2, "foo"); - errors += string_check(buf, " fo"); + errors += string_check(buf, " fo"); /* spellchecker:disable-line */ curl_msnprintf(buf, sizeof(buf), "%*.*s", 2, 5, "foo"); errors += string_check(buf, "foo"); diff --git a/tests/runner.pm b/tests/runner.pm index 2122c167ca..a208eba3a2 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -458,18 +458,18 @@ sub torture { return 0; } - my @ttests = (1 .. $count); + my @torture_tests = (1 .. $count); if($shallow && ($shallow < $count)) { - my $discard = scalar(@ttests) - $shallow; - my $percent = sprintf("%.2f%%", $shallow * 100 / scalar(@ttests)); + my $discard = scalar(@torture_tests) - $shallow; + my $percent = sprintf("%.2f%%", $shallow * 100 / scalar(@torture_tests)); logmsg " $count functions found, but only fail $shallow ($percent)\n"; while($discard) { my $rm; do { # find a test to discard - $rm = rand(scalar(@ttests)); - } while(!$ttests[$rm]); - $ttests[$rm] = undef; + $rm = rand(scalar(@torture_tests)); + } while(!$torture_tests[$rm]); + $torture_tests[$rm] = undef; $discard--; } } @@ -477,7 +477,7 @@ sub torture { logmsg " $count functions to make fail\n"; } - for (@ttests) { + for (@torture_tests) { my $limit = $_; my $fail; my $dumped_core; @@ -1368,13 +1368,13 @@ sub runnerar { # Called by controller sub runnerar_ready { my ($blocking) = @_; - my $rin = ""; + my $r_in = ""; my %idbyfileno; my $maxfileno=0; my @ready_runners = (); foreach my $p (keys(%controllerr)) { my $fd = fileno($controllerr{$p}); - vec($rin, $fd, 1) = 1; + vec($r_in, $fd, 1) = 1; $idbyfileno{$fd} = $p; # save the runner ID for each pipe fd if($fd > $maxfileno) { $maxfileno = $fd; @@ -1386,14 +1386,14 @@ sub runnerar_ready { # This may be interrupted and return EINTR, but this is ignored and the # caller will need to later call this function again. # TODO: this is relatively slow with hundreds of fds - my $ein = $rin; - if(select(my $rout=$rin, undef, my $eout=$ein, $blocking) >= 1) { + my $e_in = $r_in; + if(select(my $r_out=$r_in, undef, my $e_out=$e_in, $blocking) >= 1) { for my $fd (0..$maxfileno) { # Return an error condition first in case it's both - if(vec($eout, $fd, 1)) { + if(vec($e_out, $fd, 1)) { return (undef, $idbyfileno{$fd}); } - if(vec($rout, $fd, 1)) { + if(vec($r_out, $fd, 1)) { push(@ready_runners, $idbyfileno{$fd}); } } diff --git a/tests/runtests.pl b/tests/runtests.pl index ced595e559..23736f2ac5 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3127,8 +3127,8 @@ foreach my $runnerid (values %runnerids) { # Wait for servers to stop my $unexpected; foreach my $runnerid (values %runnerids) { - my ($rid, $unexpect, $logs) = runnerar($runnerid); - $unexpected ||= $unexpect; + my ($rid, $unexpected_for_runner, $logs) = runnerar($runnerid); + $unexpected ||= $unexpected_for_runner; logmsg $logs; } diff --git a/tests/server/getpart.c b/tests/server/getpart.c index 58ced8a45b..6bff92ab1a 100644 --- a/tests/server/getpart.c +++ b/tests/server/getpart.c @@ -244,11 +244,11 @@ int getpart(char **outbuf, size_t *outlen, const char *main, const char *sub, FILE *stream) { # define MAX_TAG_LEN 200 - char couter[MAX_TAG_LEN + 1]; /* current outermost section */ - char cmain[MAX_TAG_LEN + 1]; /* current main section */ - char csub[MAX_TAG_LEN + 1]; /* current sub section */ - char ptag[MAX_TAG_LEN + 1]; /* potential tag */ - char patt[MAX_TAG_LEN + 1]; /* potential attributes */ + char curouter[MAX_TAG_LEN + 1]; /* current outermost section */ + char curmain[MAX_TAG_LEN + 1]; /* current main section */ + char cursub[MAX_TAG_LEN + 1]; /* current sub section */ + char ptag[MAX_TAG_LEN + 1]; /* potential tag */ + char patt[MAX_TAG_LEN + 1]; /* potential attributes */ char *buffer = NULL; char *ptr; char *end; @@ -278,7 +278,7 @@ int getpart(char **outbuf, size_t *outlen, return GPE_OUT_OF_MEMORY; *(*outbuf) = '\0'; - couter[0] = cmain[0] = csub[0] = ptag[0] = patt[0] = '\0'; + curouter[0] = curmain[0] = cursub[0] = ptag[0] = patt[0] = '\0'; while((error = readline(&buffer, &bufsize, &datalen, stream)) == GPE_OK) { @@ -314,10 +314,10 @@ int getpart(char **outbuf, size_t *outlen, memcpy(ptag, ptr, len.uns); ptag[len.uns] = '\0'; - if((STATE_INSUB == state) && !strcmp(csub, ptag)) { + if((STATE_INSUB == state) && !strcmp(cursub, ptag)) { /* end of current sub section */ state = STATE_INMAIN; - csub[0] = '\0'; + cursub[0] = '\0'; if(in_wanted_part) { /* Do we need to base64 decode the data? */ if(base64) { @@ -330,10 +330,10 @@ int getpart(char **outbuf, size_t *outlen, break; } } - else if((STATE_INMAIN == state) && !strcmp(cmain, ptag)) { + else if((STATE_INMAIN == state) && !strcmp(curmain, ptag)) { /* end of current main section */ state = STATE_OUTER; - cmain[0] = '\0'; + curmain[0] = '\0'; if(in_wanted_part) { /* Do we need to base64 decode the data? */ if(base64) { @@ -346,10 +346,10 @@ int getpart(char **outbuf, size_t *outlen, break; } } - else if((STATE_OUTER == state) && !strcmp(couter, ptag)) { + else if((STATE_OUTER == state) && !strcmp(curouter, ptag)) { /* end of outermost file section */ state = STATE_OUTSIDE; - couter[0] = '\0'; + curouter[0] = '\0'; if(in_wanted_part) break; } @@ -393,21 +393,21 @@ int getpart(char **outbuf, size_t *outlen, if(STATE_OUTSIDE == state) { /* outermost element () */ - strcpy(couter, ptag); + strcpy(curouter, ptag); state = STATE_OUTER; continue; } else if(STATE_OUTER == state) { /* start of a main section */ - strcpy(cmain, ptag); + strcpy(curmain, ptag); state = STATE_INMAIN; continue; } else if(STATE_INMAIN == state) { /* start of a sub section */ - strcpy(csub, ptag); + strcpy(cursub, ptag); state = STATE_INSUB; - if(!strcmp(cmain, main) && !strcmp(csub, sub)) { + if(!strcmp(curmain, main) && !strcmp(cursub, sub)) { /* start of wanted part */ in_wanted_part = 1; if(strstr(patt, "base64=")) diff --git a/tests/smbserver.py b/tests/smbserver.py index d48abc6729..bbaea6069e 100755 --- a/tests/smbserver.py +++ b/tests/smbserver.py @@ -193,15 +193,15 @@ class TestSmbServer(imp_smbserver.SMBSERVER): # Wrap processing in a try block which allows us to throw SmbError # to control the flow. try: - ncax_parms = imp_smb.SMBNtCreateAndX_Parameters( + ncax_params = imp_smb.SMBNtCreateAndX_Parameters( smb_command["Parameters"]) path = self.get_share_path(conn_data, - ncax_parms["RootFid"], + ncax_params["RootFid"], recv_packet["Tid"]) log.info("[SMB] Requested share path: %s", path) - disposition = ncax_parms["Disposition"] + disposition = ncax_params["Disposition"] log.debug("[SMB] Requested disposition: %s", disposition) # Currently we only support reading files. @@ -235,7 +235,7 @@ class TestSmbServer(imp_smbserver.SMBSERVER): self.tmpfiles.append(full_path) - resp_parms = imp_smb.SMBNtCreateAndXResponse_Parameters() + resp_params = imp_smb.SMBNtCreateAndXResponse_Parameters() resp_data = "" # Simple way to generate a fid @@ -243,16 +243,16 @@ class TestSmbServer(imp_smbserver.SMBSERVER): fakefid = 1 else: fakefid = conn_data["OpenedFiles"].keys()[-1] + 1 - resp_parms["Fid"] = fakefid - resp_parms["CreateAction"] = disposition + resp_params["Fid"] = fakefid + resp_params["CreateAction"] = disposition if os.path.isdir(path): - resp_parms[ + resp_params[ "FileAttributes"] = imp_smb.SMB_FILE_ATTRIBUTE_DIRECTORY - resp_parms["IsDirectory"] = 1 + resp_params["IsDirectory"] = 1 else: - resp_parms["IsDirectory"] = 0 - resp_parms["FileAttributes"] = ncax_parms["FileAttributes"] + resp_params["IsDirectory"] = 0 + resp_params["FileAttributes"] = ncax_params["FileAttributes"] # Get this file's information resp_info, error_code = imp_smbserver.queryPathInformation( @@ -262,17 +262,17 @@ class TestSmbServer(imp_smbserver.SMBSERVER): if error_code != STATUS_SUCCESS: raise SmbError(error_code, "Failed to query path info") - resp_parms["CreateTime"] = resp_info["CreationTime"] - resp_parms["LastAccessTime"] = resp_info[ + resp_params["CreateTime"] = resp_info["CreationTime"] + resp_params["LastAccessTime"] = resp_info[ "LastAccessTime"] - resp_parms["LastWriteTime"] = resp_info["LastWriteTime"] - resp_parms["LastChangeTime"] = resp_info[ + resp_params["LastWriteTime"] = resp_info["LastWriteTime"] + resp_params["LastChangeTime"] = resp_info[ "LastChangeTime"] - resp_parms["FileAttributes"] = resp_info[ + resp_params["FileAttributes"] = resp_info[ "ExtFileAttributes"] - resp_parms["AllocationSize"] = resp_info[ + resp_params["AllocationSize"] = resp_info[ "AllocationSize"] - resp_parms["EndOfFile"] = resp_info["EndOfFile"] + resp_params["EndOfFile"] = resp_info["EndOfFile"] # Let's store the fid for the connection # smbServer.log("Create file %s, mode:0x%x" % (pathName, mode)) @@ -284,11 +284,11 @@ class TestSmbServer(imp_smbserver.SMBSERVER): except SmbError as s: log.debug("[SMB] SmbError hit: %s", s) error_code = s.error_code - resp_parms = "" + resp_params = "" resp_data = "" resp_cmd = imp_smb.SMBCommand(imp_smb.SMB.SMB_COM_NT_CREATE_ANDX) - resp_cmd["Parameters"] = resp_parms + resp_cmd["Parameters"] = resp_params resp_cmd["Data"] = resp_data smb_server.setConnectionData(conn_id, conn_data) diff --git a/tests/test1173.pl b/tests/test1173.pl index 2faf472308..9b384ded78 100755 --- a/tests/test1173.pl +++ b/tests/test1173.pl @@ -134,7 +134,7 @@ sub scanmanpage { my ($file) = @_; my $reqex = 0; my $inseealso = 0; - my $inex = 0; + my $inexample = 0; my $insynop = 0; my $exsize = 0; my $synopsize = 0; @@ -166,18 +166,18 @@ sub scanmanpage { if(($_ =~ /^\.SH SYNOPSIS/i) && ($reqex)) { # this is for libcurl manpage SYNOPSIS checks $insynop = 1; - $inex = 0; + $inexample = 0; } elsif($_ =~ /^\.SH EXAMPLE/i) { $insynop = 0; - $inex = 1; + $inexample = 1; } elsif($_ =~ /^\.SH \"SEE ALSO\"/i) { $inseealso = 1; } elsif($_ =~ /^\.SH/i) { $insynop = 0; - $inex = 0; + $inexample = 0; } elsif($inseealso) { if($_ =~ /^\.BR (.*)/i) { @@ -206,7 +206,7 @@ sub scanmanpage { } } } - elsif($inex) { + elsif($inexample) { $exsize++; if($_ =~ /[^\\]\\n/) { print STDERR "$file:$line '\\n' need to be '\\\\n'!\n"; diff --git a/tests/unit/unit1302.c b/tests/unit/unit1302.c index 81a4614505..84e85877bf 100644 --- a/tests/unit/unit1302.c +++ b/tests/unit/unit1302.c @@ -84,7 +84,7 @@ static CURLcode test_unit1302(char *arg) {"\x01", 1, "AQ", 2 }, {"\x02", 1, "Ag", 2 }, {"\x03", 1, "Aw", 2 }, - {"\x04", 1, "BA", 2 }, + {"\x04", 1, "BA", 2 }, /* spellchecker:disable-line */ {"\x05", 1, "BQ", 2 }, {"\x06", 1, "Bg", 2 }, {"\x07", 1, "Bw", 2 }, diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c index 0d7f04f9de..2369ce67bf 100644 --- a/tests/unit/unit1304.c +++ b/tests/unit/unit1304.c @@ -80,7 +80,7 @@ static CURLcode test_unit1304(char *arg) * Test a non existent login (substring of an existing one) in our * netrc file. */ - login = (char *)CURL_UNCONST("admi"); + login = (char *)CURL_UNCONST("admi"); /* spellchecker:disable-line */ Curl_netrc_init(&store); result = Curl_parsenetrc(&store, "example.com", &login, &password, arg); diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c index bd26ea07c4..0265ac30e0 100644 --- a/tests/unit/unit1307.c +++ b/tests/unit/unit1307.c @@ -146,8 +146,8 @@ static CURLcode test_unit1307(char *arg) { "[! ][ ]", " ", NOMATCH }, { "[! ][ ]", "a ", MATCH }, { "*[^a].t?t", "a.txt", NOMATCH }, - { "*[^a].t?t", "ba.txt", NOMATCH }, - { "*[^a].t?t", "ab.txt", MATCH }, + { "*[^a].t?t", "ca.txt", NOMATCH }, + { "*[^a].t?t", "ac.txt", MATCH }, { "*[^a]", "", NOMATCH }, { "[!\xFF]", "", NOMATCH|LINUX_FAIL}, { "[!\xFF]", "\xFF", NOMATCH|LINUX_FAIL|MAC_FAIL},