mirror of
https://github.com/curl/curl.git
synced 2026-07-22 16:57:16 +03:00
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
This commit is contained in:
parent
792a61e204
commit
0260e8465a
81 changed files with 279 additions and 206 deletions
27
.github/scripts/codespell-ignore.txt
vendored
27
.github/scripts/codespell-ignore.txt
vendored
|
|
@ -1,16 +1,21 @@
|
|||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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
|
||||
|
|
|
|||
20
.github/scripts/codespell.sh
vendored
Executable file
20
.github/scripts/codespell.sh
vendored
Executable file
|
|
@ -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)
|
||||
14
.github/scripts/typos.sh
vendored
Executable file
14
.github/scripts/typos.sh
vendored
Executable file
|
|
@ -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 -
|
||||
29
.github/scripts/typos.toml
vendored
Normal file
29
.github/scripts/typos.toml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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/*",
|
||||
]
|
||||
25
.github/workflows/checksrc.yml
vendored
25
.github/workflows/checksrc.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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_([^\(]*))\(/) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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. "
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ NULL
|
|||
#include <curl/curl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ NULL
|
|||
#include <curl/curl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ connect to non-listen
|
|||
<reply>
|
||||
<servercmd>
|
||||
# Assuming there's nothing listening on port 1
|
||||
REPLY EPSV 229 Entering Passiv Mode (|||1|)
|
||||
REPLY EPSV 229 Entering Passive Mode (|||1|)
|
||||
</servercmd>
|
||||
<data>
|
||||
here are some bytes
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ HTTP GET with split initial request send
|
|||
CURL_SMALLREQSEND=128
|
||||
</setenv>
|
||||
<command>
|
||||
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"
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|||
Content-Length: 6
|
||||
Funny-head: yesyes
|
||||
|
||||
-noo-
|
||||
-nooo-
|
||||
</data>
|
||||
<data1>
|
||||
HTTP/1.1 200 OK
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ connection-monitor
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
Re-using HTTP proxy connection for two different host names
|
||||
Reusing HTTP proxy connection for two different host names
|
||||
</name>
|
||||
<command>
|
||||
--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:8990/ http://different.remote.haxx.se.%TESTNUMBER:8990
|
||||
|
|
|
|||
|
|
@ -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: */*
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ digest
|
|||
HTTP with proxy-requiring-Basic to site-requiring-Digest
|
||||
</name>
|
||||
<command>
|
||||
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
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ digest
|
|||
HTTP with proxy-requiring-Digest to site-requiring-Digest
|
||||
</name>
|
||||
<command>
|
||||
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
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ digest
|
|||
HTTP with proxy-requiring-NTLM to site-requiring-Digest
|
||||
</name>
|
||||
<command>
|
||||
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
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ HTTP POST
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ HTTP Digest auth
|
|||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
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
|
|||
</data1>
|
||||
|
||||
<datacheck>
|
||||
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
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ HTTP NTLM auth
|
|||
<reply>
|
||||
# the first request has NTLM type-1 included, and then the 1001 is returned
|
||||
<data1001>
|
||||
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
|
|||
</data>
|
||||
|
||||
<datacheck>
|
||||
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
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ FTP
|
|||
# Server-side
|
||||
<reply>
|
||||
<servercmd>
|
||||
REPLY PASV 227 Entering Passiv Mode (1216,256,2,127,127,127)
|
||||
REPLY PASV 227 Entering Passive Mode (1216,256,2,127,127,127)
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ FTP
|
|||
# Server-side
|
||||
<reply>
|
||||
<servercmd>
|
||||
REPLY EPSV 229 Entering Passiv Mode (|||1000000|)
|
||||
REPLY EPSV 229 Entering Passive Mode (|||1000000|)
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ upgrade
|
|||
</servercmd>
|
||||
|
||||
# Full list of frames: see <verify.stdout> 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
|
||||
<data nocheck="yes" nonewline="yes">
|
||||
HTTP/1.1 101 Switching to WebSockets
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ digest
|
|||
HTTP with proxy Digest and site Digest with creds in URLs
|
||||
</name>
|
||||
<command>
|
||||
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
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ http
|
|||
HTTP with --json
|
||||
</name>
|
||||
<command>
|
||||
--json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
--json '{ "drink": "coffee" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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" }
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ http
|
|||
HTTP with --json from stdin
|
||||
</name>
|
||||
<stdin>
|
||||
{ "drink": "coffe" }
|
||||
{ "drink": "coffee" }
|
||||
</stdin>
|
||||
<command>
|
||||
--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" }
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ http
|
|||
HTTP with --json x 2
|
||||
</name>
|
||||
<command>
|
||||
--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"
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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" }
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ http
|
|||
HTTP with --json + --next
|
||||
</name>
|
||||
<command>
|
||||
--json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002
|
||||
--json '{ "drink": "coffee" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -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: */*
|
||||
|
|
|
|||
|
|
@ -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: */*
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ proxy
|
|||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy auth Digest multi API re-using connection
|
||||
HTTP proxy auth Digest multi API reusing connection
|
||||
</name>
|
||||
<command>
|
||||
http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ body
|
|||
imap
|
||||
</server>
|
||||
<name>
|
||||
IMAP doesn't perform SELECT if re-using the same mailbox
|
||||
IMAP doesn't perform SELECT if reusing the same mailbox
|
||||
</name>
|
||||
<command>
|
||||
'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=456/;SECTION=2.3' -u user:secret
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RFC7628
|
|||
<servercmd>
|
||||
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
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ RFC7628
|
|||
<servercmd>
|
||||
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
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ RFC7628
|
|||
<reply>
|
||||
<servercmd>
|
||||
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
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RFC7628
|
|||
<servercmd>
|
||||
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
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RFC7628
|
|||
<reply>
|
||||
<servercmd>
|
||||
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
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ http
|
|||
HTTP with auth in URL redirected to another host
|
||||
</name>
|
||||
<command>
|
||||
-x %HOSTIP:%HTTPPORT http://alberto:einstein@somwhere.example/%TESTNUMBER --location-trusted
|
||||
-x %HOSTIP:%HTTPPORT http://alberto:einstein@somewhere.example/%TESTNUMBER --location-trusted
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -73,8 +73,8 @@ HTTP with auth in URL redirected to another host
|
|||
QUIT
|
||||
</strip>
|
||||
<protocol>
|
||||
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: */*
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ http
|
|||
HTTP with auth in first URL but not second
|
||||
</name>
|
||||
<command>
|
||||
-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
|
||||
</command>
|
||||
</client>
|
||||
|
||||
|
|
@ -63,8 +63,8 @@ HTTP with auth in first URL but not second
|
|||
QUIT
|
||||
</strip>
|
||||
<protocol>
|
||||
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: */*
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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__,
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 (<testcase>) */
|
||||
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="))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue