# 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
--- /dev/null
+#!/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)
--- /dev/null
+#!/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 -
--- /dev/null
+# 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/*",
+]
- 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
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
# 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_([^\(]*))\(/) {
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;
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;
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. "
"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";
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 {
#ifdef USE_ENGINE
pKeyName = "rsa_test";
pKeyType = "ENG";
- pEngine = "chil"; /* for nChiper HSM... */
+ pEngine = "chil"; /* for nCipher HSM... */
#else
pKeyName = "testkey.pem";
pKeyType = "PEM";
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;
"-----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);
# 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
#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
#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
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);
}
* 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.
*/
#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;
}
}
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);
return CURLE_TOO_LARGE;
}
else if(!a) {
- DEBUGASSERT(!indx);
+ DEBUGASSERT(!idx);
/* first invoke */
if(MIN_FIRST_ALLOC > s->toobig)
a = s->toobig;
}
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;
}
*
* 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)
(void) mach_timebase_info(&timebase);
usecs = mach_absolute_time();
- usecs *= timebase.numer;
+ usecs *= timebase.numer; /* spellchecker:disable-line */
usecs /= timebase.denom;
usecs /= 1000;
* 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,
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.
*/
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. */
{"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 */
{"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 */
*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",
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);
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 */
};
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;
}
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;
}
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;
}
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;
}
"ECDH" "\0"
"ECDHE" "\0"
"ECDSA" "\0"
- "EDE" "\0"
+ "EDE" "\0" /* spellchecker:disable-line */
"GCM" "\0"
"MD5" "\0"
"NULL" "\0"
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,
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;
#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),
eTlsAlgorithmUsage eAlgorithmUsage;
UNICODE_STRING strCngAlgId;
DWORD cChainingModes;
- PUNICODE_STRING rgstrChainingModes;
+ PUNICODE_STRING rgstrChainingModes; /* spellchecker:disable-line */
DWORD dwMinBitLength;
DWORD dwMaxBitLength;
} CRYPTO_SETTINGS, * PCRYPTO_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;
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 */
};
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'
$ 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
/*
* 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,
"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);
}
}
***************************************************************************/
#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;
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),
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
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
<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
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>
Host: %HOSTIP:%HTTPPORT\r
User-Agent: curl/%VERSION\r
Accept: */*\r
-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\r
+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\r
\r
</protocol>
</verify>
Content-Length: 6
Funny-head: yesyes
--noo-
+-nooo-
</data>
<data1>
HTTP/1.1 200 OK
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
\r
GET /%TESTNUMBER0002 HTTP/1.1\r
Host: %HOSTIP:%HTTPPORT\r
-Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIr", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5\r
User-Agent: curl/%VERSION\r
Accept: */*\r
\r
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>
GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1\r
Host: data.from.server.requiring.digest.hohoho.com\r
Proxy-Authorization: Basic %b64[foo:bar]b64%\r
-Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="13c7c02a252cbe1c46d8669898a3be26"\r
+Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="304c55b19dbcb9c7e7a3354abd11ba1b"\r
User-Agent: curl/%VERSION\r
Accept: */*\r
Proxy-Connection: Keep-Alive\r
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>
GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1\r
Host: data.from.server.requiring.digest.hohoho.com\r
Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="fb8608e00ad9239a3dedb14bc8575976"\r
-Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="ca87f2d768a231e2d637a55698d5c416"\r
+Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="bfecb43898f3db12543650d45493313b"\r
User-Agent: curl/%VERSION\r
Accept: */*\r
Proxy-Connection: Keep-Alive\r
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>
\r
GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1\r
Host: data.from.server.requiring.digest.hohoho.com\r
-Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/%TESTNUMBER", response="95d48591985a03c4b49cb962aa7bd3e6"\r
+Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/%TESTNUMBER", response="89b737a4b6eefde285c093c92e9bd6ea"\r
User-Agent: curl/%VERSION\r
Accept: */*\r
Proxy-Connection: Keep-Alive\r
# Server-side
<reply>
<data>
-HTTP/1.1 200 beng swsclose\r
+HTTP/1.1 200 foobar swsclose\r
Server: Microsoft-IIS/6.0\r
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
Content-Type: text/html; charset=iso-8859-1\r
# Server-side
<reply>
<data>
-HTTP/1.1 200 beng swsclose swsbounce\r
+HTTP/1.1 200 foobar swsclose swsbounce\r
Server: Microsoft-IIS/6.0\r
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
Content-Type: text/html; charset=iso-8859-1\r
</data1>
<datacheck>
-HTTP/1.1 200 beng swsclose swsbounce\r
+HTTP/1.1 200 foobar swsclose swsbounce\r
Server: Microsoft-IIS/6.0\r
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
Content-Type: text/html; charset=iso-8859-1\r
<reply>
# the first request has NTLM type-1 included, and then the 1001 is returned
<data1001>
-HTTP/1.1 200 beng swsclose\r
+HTTP/1.1 200 foobar swsclose\r
Server: Microsoft-IIS/6.0\r
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
Content-Type: text/html; charset=iso-8859-1\r
</data>
<datacheck>
-HTTP/1.1 200 beng swsclose\r
+HTTP/1.1 200 foobar swsclose\r
Server: Microsoft-IIS/6.0\r
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
Content-Type: text/html; charset=iso-8859-1\r
# 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>
# Server-side
<reply>
<servercmd>
-REPLY EPSV 229 Entering Passiv Mode (|||1000000|)
+REPLY EPSV 229 Entering Passive Mode (|||1000000|)
</servercmd>
</reply>
</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
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>
GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1\r
Host: data.from.server.requiring.digest.hohoho.com\r
Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"\r
-Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="08a2e2e684047f4219a38ddc189ac00c"\r
+Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="ea0f4cb7a119a1a6f6c6c6c2e4190860"\r
User-Agent: curl/%VERSION\r
Accept: */*\r
Proxy-Connection: Keep-Alive\r
HTTP with --json
</name>
<command>
---json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+--json '{ "drink": "coffee" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
User-Agent: curl/%VERSION\r
Content-Type: application/json\r
Accept: application/json\r
-Content-Length: 20\r
+Content-Length: 21\r
\r
-{ "drink": "coffe" }
+{ "drink": "coffee" }
</protocol>
</verify>
</testcase>
HTTP with --json from stdin
</name>
<stdin>
-{ "drink": "coffe" }
+{ "drink": "coffee" }
</stdin>
<command>
--json @- http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Accept: foobar/*"
User-Agent: curl/%VERSION\r
Accept: foobar/*\r
Content-Type: application/json\r
-Content-Length: 21\r
+Content-Length: 22\r
\r
-{ "drink": "coffe" }
+{ "drink": "coffee" }
</protocol>
</verify>
</testcase>
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>
User-Agent: curl/%VERSION\r
Content-Type: drinks/hot\r
Accept: application/json\r
-Content-Length: 40\r
+Content-Length: 41\r
\r
-{ "drink": "coffe", "crunch": "cookie" }
+{ "drink": "coffee", "crunch": "cookie" }
</protocol>
</verify>
</testcase>
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>
User-Agent: curl/%VERSION\r
Content-Type: application/json\r
Accept: application/json\r
-Content-Length: 20\r
+Content-Length: 21\r
\r
-{ "drink": "coffe" }GET /%TESTNUMBER0002 HTTP/1.1\r
+{ "drink": "coffee" }GET /%TESTNUMBER0002 HTTP/1.1\r
Host: %HOSTIP:%HTTPPORT\r
User-Agent: curl/%VERSION\r
Accept: */*\r
\r
GET /%TESTNUMBER0002 HTTP/1.1\r
Host: %HOSTIP:%HTTPPORT\r
-Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIr", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5\r
User-Agent: curl/%VERSION\r
Accept: */*\r
\r
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
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
<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>
<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>
<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>
<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>
<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>
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>
QUIT
</strip>
<protocol>
-GET http://somwhere.example/998 HTTP/1.1\r
-Host: somwhere.example\r
+GET http://somewhere.example/998 HTTP/1.1\r
+Host: somewhere.example\r
Authorization: Basic %b64[alberto:einstein]b64%\r
User-Agent: curl/%VERSION\r
Accept: */*\r
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>
QUIT
</strip>
<protocol>
-GET http://somwhere.example/%TESTNUMBER HTTP/1.1\r
-Host: somwhere.example\r
+GET http://somewhere.example/%TESTNUMBER HTTP/1.1\r
+Host: somewhere.example\r
Authorization: Basic %b64[alberto:einstein]b64%\r
User-Agent: curl/%VERSION\r
Accept: */*\r
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"
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"
@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)
"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",
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;
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__,
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");
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--;
}
}
logmsg " $count functions to make fail\n";
}
- for (@ttests) {
+ for (@torture_tests) {
my $limit = $_;
my $fail;
my $dumped_core;
# 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;
# 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});
}
}
# 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;
}
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;
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) {
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) {
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) {
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;
}
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="))
# 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.
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
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(
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))
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)
my ($file) = @_;
my $reqex = 0;
my $inseealso = 0;
- my $inex = 0;
+ my $inexample = 0;
my $insynop = 0;
my $exsize = 0;
my $synopsize = 0;
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) {
}
}
}
- elsif($inex) {
+ elsif($inexample) {
$exsize++;
if($_ =~ /[^\\]\\n/) {
print STDERR "$file:$line '\\n' need to be '\\\\n'!\n";
{"\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 },
* 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);
{ "[! ][ ]", " ", 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},