mirror of
https://github.com/curl/curl.git
synced 2026-08-02 10:50:28 +03:00
tidy-up: miscellaneous
- `N byte` -> `N-byte` or `N bytes`. - INTERNALS.md: language tweaks. - schannel: language tweak in comment/error message. - socks_gssapi, socks_sspi: simplify composing an error message. (at a cost of 8 extra constant string bytes.) - m4/curl-compilers.m4: fix typo in link (in comment). - contrithanks.sh: fix indent, drop stray `;` terminator. - lib, src, tests: drop/fix a bunch of badwords. - fix typos in comments. - fix indent, stray spaces. Some of these spotted by GitHub Code Quality and Copilot Closes #22009
This commit is contained in:
parent
5bff1c35f1
commit
0ffab25b6c
158 changed files with 357 additions and 366 deletions
|
|
@ -24,7 +24,7 @@ want it to remain functional and buildable with these and later versions
|
|||
|
||||
## Dependencies
|
||||
|
||||
We aim to support these or later versions.
|
||||
We aim to support these or later versions:
|
||||
|
||||
- brotli 1.0.0 (2017-09-21)
|
||||
- c-ares 1.16.0 (2020-03-13)
|
||||
|
|
@ -49,9 +49,9 @@ We aim to support these or later versions.
|
|||
|
||||
When writing code (mostly for generating stuff included in release tarballs)
|
||||
we use a few "build tools" and we make sure that we remain functional with
|
||||
these versions:
|
||||
these or later versions:
|
||||
|
||||
- clang-tidy 17.0.0 (2023-09-19), recommended: 19.1.0 or later (2024-09-17)
|
||||
- clang-tidy 17.0.0 (2023-09-19), recommended: 19.1.0 (2024-09-17)
|
||||
- cmake 3.18 (2020-07-15)
|
||||
- GNU autoconf 2.59 (2003-11-06)
|
||||
- GNU automake 1.7 (2002-09-25)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ static const char olivertwist[] =
|
|||
"all events; the item of mortality whose name is prefixed";
|
||||
|
||||
/* ... to the head of this chapter. String cut off to stick within the C90
|
||||
509 byte limit. */
|
||||
509-byte limit. */
|
||||
|
||||
/*
|
||||
* This example shows an HTTP PUT operation that sends a fixed buffer with
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ interleaved RTP data. This function gets called for each $ block and therefore
|
|||
contains exactly one upper-layer protocol unit (e.g. one RTP packet). curl
|
||||
writes the interleaved header as well as the included data for each call. The
|
||||
first byte is always an ASCII dollar sign. The dollar sign is followed by a
|
||||
one byte channel identifier and then a 2 byte integer length in network byte
|
||||
one-byte channel identifier and then a 2-byte integer length in network byte
|
||||
order. See RFC 2326 Section 10.12 for more information on how RTP interleaving
|
||||
behaves. If unset or set to NULL, curl uses the default write function.
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static struct altsvc *altsvc_create(struct Curl_str *srchost,
|
|||
static void altsvc_append(struct altsvcinfo *asi, struct altsvc *as)
|
||||
{
|
||||
while(Curl_llist_count(&asi->list) >= MAX_ALTSVC_ENTRIES) {
|
||||
/* It's full. Remove the first entry in the list */
|
||||
/* It is full. Remove the first entry in the list */
|
||||
struct Curl_llist_node *e = Curl_llist_head(&asi->list);
|
||||
struct altsvc *oldas = Curl_node_elem(e);
|
||||
Curl_node_remove(e);
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ static enum alpnid cf_hc_get_httpsrr_alpn(struct Curl_cfilter *cf,
|
|||
if(Curl_httpsrr_applicable(data, rr) && !rr->no_def_alpn) {
|
||||
for(i = 0; i < CURL_ARRAYSIZE(rr->alpns); ++i) {
|
||||
enum alpnid alpn_rr = (enum alpnid)rr->alpns[i];
|
||||
if(alpn_rr == not_this_one) /* don't want this one */
|
||||
if(alpn_rr == not_this_one) /* do not want this one */
|
||||
continue;
|
||||
switch(alpn_rr) {
|
||||
case ALPN_h3:
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ static CURLcode cf_setup_add_origin_filters(struct Curl_cfilter *cf,
|
|||
#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) && \
|
||||
!defined(CURL_DISABLE_PROXY)
|
||||
|
||||
/* Wanting QUIC with a HTTP tunneling filter, we now need to add
|
||||
/* Wanting QUIC with an HTTP tunneling filter, we now need to add
|
||||
* the QUIC filter on top. Without tunneling, this has already
|
||||
* happened in the Happy Eyeball filter. */
|
||||
if(ctx->transport == TRNSPRT_QUIC &&
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@
|
|||
/* Define to 1 if you have a working getaddrinfo function. */
|
||||
#cmakedefine HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if the getaddrinfo function is threadsafe. */
|
||||
/* Define to 1 if the getaddrinfo function is thread-safe. */
|
||||
#cmakedefine HAVE_GETADDRINFO_THREADSAFE 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* Parameters:
|
||||
*
|
||||
* buf [in] - A pointer to a 2 byte buffer.
|
||||
* buf [in] - A pointer to a 2-byte buffer.
|
||||
*
|
||||
* Returns the integer.
|
||||
*/
|
||||
|
|
@ -53,7 +53,7 @@ unsigned short Curl_read16_le(const unsigned char *buf)
|
|||
*
|
||||
* Parameters:
|
||||
*
|
||||
* buf [in] - A pointer to a 4 byte buffer.
|
||||
* buf [in] - A pointer to a 4-byte buffer.
|
||||
*
|
||||
* Returns the integer.
|
||||
*/
|
||||
|
|
@ -72,7 +72,7 @@ unsigned int Curl_read32_le(const unsigned char *buf)
|
|||
*
|
||||
* Parameters:
|
||||
*
|
||||
* buf [in] - A pointer to a 2 byte buffer.
|
||||
* buf [in] - A pointer to a 2-byte buffer.
|
||||
*
|
||||
* Returns the integer.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -292,8 +292,8 @@ static bool encrypt_des(const unsigned char *in, unsigned char *out,
|
|||
#endif /* crypto backends */
|
||||
|
||||
/*
|
||||
* takes a 21 byte array and treats it as 3 56-bit DES keys. The
|
||||
* 8 byte plaintext is encrypted with each key and the resulting 24
|
||||
* takes a 21-byte array and treats it as 3 56-bit DES keys. The
|
||||
* 8-byte plaintext is encrypted with each key and the resulting 24
|
||||
* bytes are stored in the results array.
|
||||
*/
|
||||
void Curl_ntlm_core_lm_resp(const unsigned char *keys,
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@
|
|||
/* please, do it beyond the point further indicated in this file. */
|
||||
/* ================================================================ */
|
||||
|
||||
/* Give calloc a chance to be dragging in early, so we do not redefine */
|
||||
/* Give calloc a chance to be included early, so we do not redefine */
|
||||
#ifdef HAVE_THREADS_POSIX
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
|
@ -461,7 +461,7 @@
|
|||
# undef HAVE_FCNTL
|
||||
# undef HAVE_FCNTL_O_NONBLOCK
|
||||
# else
|
||||
/* use libc networking and hence close() and fnctl() */
|
||||
/* use libc networking and hence close() and fcntl() */
|
||||
# undef HAVE_CLOSESOCKET_CAMEL
|
||||
# undef HAVE_IOCTLSOCKET_CAMEL
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -4462,8 +4462,8 @@ bool ftp_conns_match(struct connectdata *needle, struct connectdata *conn)
|
|||
return FALSE;
|
||||
/* A mismatch on `use_ssl` MUST have been found in connection matching
|
||||
* before we come here. This is a check on MAYBE/MUST use of STARTTLS and
|
||||
* it only works on ftp. But imap/smtp etc have the same `use_ssl` and
|
||||
* no extra match like ftp. We lack tests in this area, so let ftp fail
|
||||
* it only works on FTP. But IMAP/SMTP etc have the same `use_ssl` and
|
||||
* no extra match like FTP. We lack tests in this area, so let FTP fail
|
||||
* loudly here to help other cases. */
|
||||
if(nftpc->use_ssl > cftpc->use_ssl) {
|
||||
DEBUGASSERT(0);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ void Curl_hsts_cleanup(struct hsts **hp)
|
|||
static void hsts_append(struct hsts *h, struct stsentry *sts)
|
||||
{
|
||||
if(Curl_llist_count(&h->list) == MAX_HSTS_ENTRIES) {
|
||||
/* It's full. Remove the first entry in the list */
|
||||
/* It is full. Remove the first entry in the list */
|
||||
struct Curl_llist_node *e = Curl_llist_head(&h->list);
|
||||
struct stsentry *oldsts = Curl_node_elem(e);
|
||||
Curl_node_remove(e);
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
|||
int ldap_proto = LDAP_VERSION3;
|
||||
int ldap_ssl = 0;
|
||||
#ifdef LDAP_OPT_NETWORK_TIMEOUT
|
||||
struct timeval ldap_timeout = {10, 0}; /* 10 sec connection/search timeout */
|
||||
struct timeval ldap_timeout = { 10, 0 }; /* 10s connection/search timeout */
|
||||
#endif
|
||||
#ifdef USE_WIN32_LDAP
|
||||
TCHAR *host = NULL;
|
||||
|
|
@ -463,9 +463,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
|||
name = curlx_convert_tchar_to_UTF8(dn);
|
||||
if(!name) {
|
||||
ldap_memfree(dn);
|
||||
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
|
||||
goto quit;
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1940,7 +1940,7 @@ static CURLcode cr_mime_read(struct Curl_easy *data,
|
|||
else if(blen <= 4) {
|
||||
/* Curl_mime_read() may go into an infinite loop when reading
|
||||
* via a base64 encoder, as it stalls when the read buffer is too small
|
||||
* to contain a complete 3 byte encoding. Read into a larger buffer
|
||||
* to contain a complete 3-byte encoding. Read into a larger buffer
|
||||
* and use that until empty. */
|
||||
CURL_TRC_READ(data, "cr_mime_read(len=%zu), small read, using tmp", blen);
|
||||
nread = Curl_mime_read(tmp, 1, sizeof(tmp), ctx->part);
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ CURLcode Curl_peer_from_url(CURLU *uh, struct Curl_easy *data,
|
|||
}
|
||||
|
||||
if(scopeid_override)
|
||||
/* Override any scope id from an url zone. */
|
||||
/* Override any scope id from an URL zone. */
|
||||
pp.scopeid = scopeid_override;
|
||||
else {
|
||||
if(curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0) ==
|
||||
|
|
@ -593,7 +593,7 @@ CURLcode Curl_peer_from_proxy_url(CURLU *uh,
|
|||
result = CURLE_OUT_OF_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
/* url came without scheme, the passed `proxytype` determines it */
|
||||
/* URL came without scheme, the passed `proxytype` determines it */
|
||||
switch(proxytype) {
|
||||
case CURLPROXY_HTTP:
|
||||
case CURLPROXY_HTTP_1_0:
|
||||
|
|
@ -666,7 +666,7 @@ CURLcode Curl_peer_from_proxy_url(CURLU *uh,
|
|||
curlx_free(portptr);
|
||||
}
|
||||
else {
|
||||
/* No port in url, take the set one or the scheme's default */
|
||||
/* No port in URL, take the set one or the scheme's default */
|
||||
if(data->set.proxyport)
|
||||
pp.port = data->set.proxyport;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ static CURLcode pop3_perform_apop(struct Curl_easy *data,
|
|||
/* Finalise the digest */
|
||||
Curl_MD5_final(ctxt, digest);
|
||||
|
||||
/* Convert the calculated 16 octet digest into a 32 byte hex string */
|
||||
/* Convert the calculated 16 octet digest into a 32-byte hex string */
|
||||
for(i = 0; i < MD5_DIGEST_LEN; i++)
|
||||
curl_msnprintf(&secret[2 * i], 3, "%02x", digest[i]);
|
||||
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ static CURLcode parse_proxy(struct Curl_easy *data,
|
|||
char *proxypasswd = NULL;
|
||||
char *scheme = NULL;
|
||||
CURLcode result = CURLE_OK;
|
||||
/* Set the start proxy type for url scheme guessing */
|
||||
/* Set the start proxy type for URL scheme guessing */
|
||||
uint8_t proxytype = for_pre_proxy ? CURLPROXY_SOCKS4 : data->set.proxytype;
|
||||
CURLU *uhp = curl_url();
|
||||
CURLUcode uc;
|
||||
|
|
@ -588,7 +588,7 @@ CURLcode Curl_proxy_init_conn(struct Curl_easy *data,
|
|||
case CURLPROXY_SOCKS4A:
|
||||
case CURLPROXY_SOCKS5:
|
||||
case CURLPROXY_SOCKS5_HOSTNAME:
|
||||
/* Whoops, it's not a HTTP proxy */
|
||||
/* Whoops, it is not an HTTP proxy */
|
||||
if(pre_proxy) {
|
||||
/* and we already have a SOCKS pre-proxy. Cannot have both */
|
||||
failf(data, "Having a SOCKS pre-proxy and proxy is not "
|
||||
|
|
|
|||
10
lib/proxy.h
10
lib/proxy.h
|
|
@ -38,17 +38,17 @@ struct proxy_info {
|
|||
uint8_t proxytype; /* what kind of proxy that is in use */
|
||||
};
|
||||
|
||||
#define CURL_PROXY_IS_HTTPS(t) \
|
||||
#define CURL_PROXY_IS_HTTPS(t) \
|
||||
(((t) == CURLPROXY_HTTPS) || \
|
||||
((t) == CURLPROXY_HTTPS2) || \
|
||||
((t) == CURLPROXY_HTTPS3))
|
||||
|
||||
#define CURL_PROXY_IS_HTTP(t) \
|
||||
(((t) == CURLPROXY_HTTP) || \
|
||||
#define CURL_PROXY_IS_HTTP(t) \
|
||||
(((t) == CURLPROXY_HTTP) || \
|
||||
((t) == CURLPROXY_HTTP_1_0))
|
||||
|
||||
#define CURL_PROXY_IS_ANY_HTTP(t) \
|
||||
(CURL_PROXY_IS_HTTP(t) || \
|
||||
#define CURL_PROXY_IS_ANY_HTTP(t) \
|
||||
(CURL_PROXY_IS_HTTP(t) || \
|
||||
CURL_PROXY_IS_HTTPS(t))
|
||||
|
||||
CURLcode Curl_proxy_init_conn(struct Curl_easy *data,
|
||||
|
|
|
|||
|
|
@ -1231,4 +1231,4 @@ const struct Curl_protocol Curl_protocol_smb = {
|
|||
ZERO_NULL, /* follow */
|
||||
};
|
||||
|
||||
#endif /* CURL_ENABLE_SMB && USE_CURL_NTLM_CORE && SIZEOF_CURL_OFF_T > 4 */
|
||||
#endif /* CURL_ENABLE_SMB && USE_CURL_NTLM_CORE */
|
||||
|
|
|
|||
10
lib/socks.c
10
lib/socks.c
|
|
@ -553,7 +553,7 @@ process_state:
|
|||
FALLTHROUGH();
|
||||
|
||||
case SOCKS4_ST_RECV:
|
||||
/* Receive 8 byte response */
|
||||
/* Receive 8-byte response */
|
||||
presult = socks_recv(sx, cf, data, 8, &done);
|
||||
if(presult)
|
||||
return socks_failed(sx, cf, data, presult);
|
||||
|
|
@ -799,7 +799,7 @@ static CURLproxycode socks5_req1_init(struct socks_ctx *sx,
|
|||
DEBUGASSERT(hostname_len <= 255);
|
||||
desttype = 3;
|
||||
destination = (const unsigned char *)sx->dest->hostname;
|
||||
destlen = (unsigned char)hostname_len; /* one byte length */
|
||||
destlen = (unsigned char)hostname_len; /* 1-byte length */
|
||||
}
|
||||
|
||||
req[3] = desttype;
|
||||
|
|
@ -959,9 +959,9 @@ static CURLproxycode socks5_recv_resp1(struct socks_ctx *sx,
|
|||
+----+-----+-------+------+----------+----------+
|
||||
|
||||
ATYP:
|
||||
o IPv4 address: 0x01, BND.ADDR = 4 byte
|
||||
o domain name: 0x03, BND.ADDR = [ 1 byte length, string ]
|
||||
o IPv6 address: 0x04, BND.ADDR = 16 byte
|
||||
o IPv4 address: 0x01, BND.ADDR = 4-byte
|
||||
o domain name: 0x03, BND.ADDR = [ 1-byte length, string ]
|
||||
o IPv6 address: 0x04, BND.ADDR = 16-byte
|
||||
*/
|
||||
if(resp[0] != 5) { /* version */
|
||||
failf(data, "SOCKS5 reply has wrong version, version should be 5.");
|
||||
|
|
|
|||
|
|
@ -551,10 +551,10 @@ static CURLcode socks5_gss_negotiate_enc(struct Curl_cfilter *cf,
|
|||
gss_recv_token.length = 0;
|
||||
}
|
||||
|
||||
infof(data, "SOCKS5 access with%s protection granted.",
|
||||
(socksreq[0] == 0) ? "out GSS-API data" :
|
||||
((socksreq[0] == 1) ? " GSS-API integrity" :
|
||||
" GSS-API confidentiality"));
|
||||
infof(data, "SOCKS5 access %s protection granted.",
|
||||
(socksreq[0] == 0) ? "without GSS-API data" :
|
||||
((socksreq[0] == 1) ? "with GSS-API integrity" :
|
||||
"with GSS-API confidentiality"));
|
||||
|
||||
conn->socks5_gssapi_enctype = socksreq[0];
|
||||
if(socksreq[0] == 0)
|
||||
|
|
|
|||
|
|
@ -457,10 +457,10 @@ static CURLcode socks5_sspi_encrypt(struct Curl_cfilter *cf,
|
|||
}
|
||||
curlx_free(sspi_w_token[0].pvBuffer);
|
||||
|
||||
infof(data, "SOCKS5 access with%s protection granted BUT NOT USED.",
|
||||
(socksreq[0] == 0) ? "out GSS-API data" :
|
||||
((socksreq[0] == 1) ? " GSS-API integrity" :
|
||||
" GSS-API confidentiality"));
|
||||
infof(data, "SOCKS5 access %s protection granted BUT NOT USED.",
|
||||
(socksreq[0] == 0) ? "without GSS-API data" :
|
||||
((socksreq[0] == 1) ? "with GSS-API integrity" :
|
||||
"with GSS-API confidentiality"));
|
||||
|
||||
cf->conn->socks5_gssapi_enctype = socksreq[0];
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
30
lib/telnet.c
30
lib/telnet.c
|
|
@ -196,20 +196,15 @@ static CURLcode init_telnet(struct Curl_easy *data)
|
|||
tn->us_preferred[CURL_TELOPT_SGA] = CURL_YES;
|
||||
tn->him_preferred[CURL_TELOPT_SGA] = CURL_YES;
|
||||
|
||||
/* To be compliant with previous releases of libcurl
|
||||
we enable this option by default. This behavior
|
||||
can be changed thanks to the "BINARY" option in
|
||||
CURLOPT_TELNETOPTIONS
|
||||
*/
|
||||
/* To be compliant with previous releases of libcurl we enable this option
|
||||
by default. This behavior can be changed with the "BINARY" option in
|
||||
CURLOPT_TELNETOPTIONS */
|
||||
tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES;
|
||||
tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES;
|
||||
|
||||
/* We must allow the server to echo what we sent
|
||||
but it is not necessary to request the server
|
||||
to do so (it might forces the server to close
|
||||
the connection). Hence, we ignore ECHO in the
|
||||
negotiate function
|
||||
*/
|
||||
/* We must allow the server to echo what we sent but it is not necessary
|
||||
to request the server to do so (it might force the server to close
|
||||
the connection). Hence, we ignore ECHO in the negotiate function */
|
||||
tn->him_preferred[CURL_TELOPT_ECHO] = CURL_YES;
|
||||
|
||||
/* Set the subnegotiation fields to send information after negotiation
|
||||
|
|
@ -217,12 +212,11 @@ static CURLcode init_telnet(struct Curl_easy *data)
|
|||
|
||||
Default values are (0,0) initialized by calloc.
|
||||
According to the RFC1013 it is valid:
|
||||
A value equal to zero is acceptable for the width (or height),
|
||||
and means that no character width (or height) is being sent.
|
||||
In this case, the width (or height) that will be assumed by the
|
||||
Telnet server is operating system specific (it will probably be
|
||||
based upon the terminal type information that may have been sent
|
||||
using the TERMINAL TYPE Telnet option). */
|
||||
A value equal to zero is acceptable for the width (or height), and means
|
||||
that no character width (or height) is being sent. In this case, the width
|
||||
(or height) that will be assumed by the Telnet server is operating system
|
||||
specific (it will probably be based upon the terminal type information
|
||||
that may have been sent using the TERMINAL TYPE Telnet option). */
|
||||
tn->subnegotiation[CURL_TELOPT_NAWS] = CURL_YES;
|
||||
|
||||
return Curl_meta_set(data, CURL_META_TELNET_EASY, tn, telnet_easy_dtor);
|
||||
|
|
@ -1278,7 +1272,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
|
||||
/* The get the Windows file handle for stdin */
|
||||
/* Then get the Windows file handle for stdin */
|
||||
stdin_handle = GetStdHandle(STD_INPUT_HANDLE);
|
||||
|
||||
/* Create the list of objects to wait for */
|
||||
|
|
|
|||
|
|
@ -883,7 +883,7 @@ UNITTEST CURLUcode parse_file(const char *url, size_t urllen, CURLU *u,
|
|||
pathlen = urllen - 5;
|
||||
|
||||
/* RFC 8089: file-hier-part = ( "//" auth-path ) / local-path, where
|
||||
local-path also starts with a "/". So reject anything that doesn't
|
||||
local-path also starts with a "/". So reject anything that does not
|
||||
start with at least one "/" */
|
||||
if(path[0] != '/')
|
||||
return CURLUE_BAD_FILE_URL;
|
||||
|
|
|
|||
|
|
@ -1167,7 +1167,7 @@ static CURLcode cf_h3_proxy_connect(struct Curl_cfilter *cf,
|
|||
CF_DATA_SAVE(save, cf, data);
|
||||
data_saved = TRUE;
|
||||
|
||||
/* At this point the QUIC is connected, but the proxy isn't connected */
|
||||
/* At this point the QUIC is connected, but the proxy is not connected */
|
||||
result = cf_h3_proxy_tunnel(cf, data, ts, done);
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -2611,7 +2611,7 @@ static CURLcode myssh_connect(struct Curl_easy *data, bool *done)
|
|||
|
||||
sshc->ssh_session = ssh_new();
|
||||
if(!sshc->ssh_session) {
|
||||
failf(data, "Failure initialising ssh session");
|
||||
failf(data, "Failure initializing ssh session");
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3486,7 +3486,7 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
|
|||
my_libssh2_realloc, data);
|
||||
|
||||
if(!sshc->ssh_session) {
|
||||
failf(data, "Failure initialising ssh session");
|
||||
failf(data, "Failure initializing ssh session");
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols,
|
|||
VERSION_GREATER_THAN_EQUAL)) {
|
||||
ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_3;
|
||||
}
|
||||
else /* Windows 10 and older */
|
||||
else /* Windows 10 or older */
|
||||
ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2;
|
||||
|
||||
break;
|
||||
|
|
@ -192,8 +192,8 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols,
|
|||
*enabled_protocols |= SP_PROT_TLS1_3_CLIENT;
|
||||
break;
|
||||
}
|
||||
else { /* Windows 10 and older */
|
||||
failf(data, "schannel: TLS 1.3 not supported on Windows prior to 11");
|
||||
else { /* Windows 10 or older */
|
||||
failf(data, "schannel: TLS 1.3 not supported on Windows 10 or older");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -988,7 +988,7 @@ static CURLcode schannel_connect_step1(struct Curl_cfilter *cf,
|
|||
}
|
||||
|
||||
/* Schannel InitializeSecurityContext:
|
||||
https://learn.microsoft.com/windows/win32/api/rrascfg/nn-rrascfg-ieapproviderconfig
|
||||
https://learn.microsoft.com/windows/win32/api/sspi/nf-sspi-initializesecuritycontextw
|
||||
|
||||
At the moment we do not pass inbuf unless we are using ALPN since we only
|
||||
use it for that, and WINE (for which we currently disable ALPN) is giving
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data,
|
|||
bool Curl_ssl_cert_status_request(void);
|
||||
|
||||
/* The maximum size of the SSL channel binding is 85 bytes, as defined in
|
||||
* RFC 5929, Section 4.1. The 'tls-server-end-point:' prefix is 21 bytes long,
|
||||
* RFC 5929, Section 4.1. The 'tls-server-end-point:' prefix is 21 bytes,
|
||||
* and SHA-512 is the longest supported hash algorithm, with a digest length of
|
||||
* 64 bytes.
|
||||
* The maximum size of the channel binding is therefore 21 + 64 = 85 bytes.
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ AC_DEFUN([CURL_CHECK_COMPILER], [
|
|||
***
|
||||
*** If you wish to help the curl project to better support your compiler
|
||||
*** you can report this and the required info on the libcurl development
|
||||
*** mailing list: https://lists.haxx.selistinfo/curl-library/
|
||||
*** mailing list: https://lists.haxx.se/listinfo/curl-library/
|
||||
***
|
||||
_EOF
|
||||
fi
|
||||
|
|
@ -1260,7 +1260,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
|
||||
dnl Enable warnings for questionable pointer arithmetic
|
||||
tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
|
||||
dnl Check for function return typw issues
|
||||
dnl Check for function return type issues
|
||||
tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
|
||||
dnl Warn on variable declarations hiding a previous one
|
||||
tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ int main(int argc, char **argv)
|
|||
size_t inbytesleft;
|
||||
size_t outbytesleft;
|
||||
char dummybuf[128];
|
||||
/* To/From codes are 32 byte long strings with
|
||||
/* To/From codes are 32-byte strings with
|
||||
reserved fields initialized to ZEROs */
|
||||
const char tocode[32] = { "IBMCCSID01208" }; /* Use UTF-8. */
|
||||
const char fromcode[32] = { "IBMCCSID000000000010" };
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ will:rewrite to present tense
|
|||
32-bits:32 bits
|
||||
64-bits:64 bits
|
||||
initialise:initialize
|
||||
initialising:initializing
|
||||
very:rephrase using an alternative word
|
||||
just:rephrase using an alternative word
|
||||
simply:rephrase using an alternative word
|
||||
|
|
@ -131,3 +132,4 @@ with with:with
|
|||
---Curl Corporation
|
||||
---:lib/:will
|
||||
---:src/:will
|
||||
---:tests/data/:file name
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ if test "$start" = "-h"; then
|
|||
exit
|
||||
fi
|
||||
if test "$start" = "stdout"; then
|
||||
# output the names on stdout
|
||||
use_stdout="yes"
|
||||
start=""
|
||||
# output the names on stdout
|
||||
use_stdout="yes"
|
||||
start=""
|
||||
else
|
||||
use_stdout="no";
|
||||
use_stdout="no"
|
||||
fi
|
||||
if test -z "$start"; then
|
||||
start=$(git tag --sort=taggerdate | grep "^curl-" | tail -1)
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ my $alllines = 0;
|
|||
# 142 417 809 1677 1305 src/tool_getparam.c(1677): getparameter
|
||||
for my $l (@output) {
|
||||
chomp $l;
|
||||
if($l =~/^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) {
|
||||
if($l =~ /^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) {
|
||||
my ($score, $len, $path, $func) = ($1, $2, $3, $4);
|
||||
|
||||
my $allow = 0;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ my $alllines = 0;
|
|||
# 142 417 809 1677 1305 src/tool_getparam.c(1677): getparameter
|
||||
for my $l (@output) {
|
||||
chomp $l;
|
||||
if($l =~/^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) {
|
||||
if($l =~ /^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) {
|
||||
my ($score, $length, $path, $func) = ($1, $2, $3, $4);
|
||||
|
||||
my $allow = 0;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Largefile
|
|||
<name>
|
||||
Invalid large X- range on a file://
|
||||
</name>
|
||||
# This range value is 2**32 + 7, which will be truncated to the valid value 7
|
||||
# This range value is 2**32 + 7, which is truncated to the valid value 7
|
||||
# if the large file support is not working correctly
|
||||
<command>
|
||||
-r 4294967303- file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Content-Type: text/html
|
|||
|
||||
# We use skip to make the test server never read the full payload off
|
||||
# the socket and instead return the response at once. In actuality, the
|
||||
# long --expect100-timeout means that it will never get a chance to read this.
|
||||
# long --expect100-timeout means that it never gets a chance to read this.
|
||||
<servercmd>
|
||||
skip: 100
|
||||
</servercmd>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ FAILURE2
|
|||
|
||||
# We use skip to make the test server never read the full payload off
|
||||
# the socket and instead return the response at once. In actuality, the
|
||||
# long --expect100-timeout means that it will never get a chance to read this.
|
||||
# long --expect100-timeout means that it never gets a chance to read this.
|
||||
<servercmd>
|
||||
skip: 100
|
||||
</servercmd>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ DELAY
|
|||
<servercmd>
|
||||
writedelay: 2000
|
||||
</servercmd>
|
||||
# ~1200 bytes (so that they do not fit in two 512 byte chunks)
|
||||
# ~1200 bytes (so that they do not fit in two 512-byte chunks)
|
||||
<data nocheck="yes">
|
||||
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ fooo
|
|||
mooo
|
||||
</file1>
|
||||
|
||||
# The final "221 bye bye baby" response to QUIT will not be recorded
|
||||
# since that is not considered part of this particular transfer!
|
||||
# The final "221 bye bye baby" response to QUIT is not recorded
|
||||
# since that is not considered part of this particular transfer.
|
||||
<file2 name="%LOGDIR/heads%TESTNUMBER" crlf="yes">
|
||||
220- _ _ ____ _
|
||||
220- ___| | | | _ \| |
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ fooo
|
|||
mooo
|
||||
</file1>
|
||||
|
||||
# The final "221 bye bye baby" response to QUIT will not be recorded
|
||||
# since that is not considered part of this particular transfer!
|
||||
# The final "221 bye bye baby" response to QUIT is not recorded
|
||||
# since that is not considered part of this particular transfer.
|
||||
<file2 name="%LOGDIR/stdout%TESTNUMBER" crlf="yes">
|
||||
220- _ _ ____ _
|
||||
220- ___| | | | _ \| |
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ fooo
|
|||
mooo
|
||||
</file1>
|
||||
|
||||
# The final "221 bye bye baby" response to QUIT will not be recorded
|
||||
# since that is not considered part of this particular transfer!
|
||||
# The final "221 bye bye baby" response to QUIT is not recorded
|
||||
# since that is not considered part of this particular transfer.
|
||||
<file2 name="%LOGDIR/heads%TESTNUMBER" crlf="yes">
|
||||
220- _ _ ____ _
|
||||
220- ___| | | | _ \| |
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ fooo
|
|||
mooo
|
||||
</file1>
|
||||
|
||||
# The final "221 bye bye baby" response to QUIT will not be recorded
|
||||
# since that is not considered part of this particular transfer!
|
||||
# The final "221 bye bye baby" response to QUIT is not recorded
|
||||
# since that is not considered part of this particular transfer.
|
||||
<file2 name="%LOGDIR/stdout%TESTNUMBER" crlf="yes">
|
||||
220- _ _ ____ _
|
||||
220- ___| | | | _ \| |
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ fooo
|
|||
mooo
|
||||
</file1>
|
||||
|
||||
# The final "221 bye bye baby" response to QUIT will not be recorded
|
||||
# since that is not considered part of this particular transfer!
|
||||
# The final "221 bye bye baby" response to QUIT is not recorded
|
||||
# since that is not considered part of this particular transfer.
|
||||
<file2 name="%LOGDIR/heads%TESTNUMBER" crlf="yes">
|
||||
220- _ _ ____ _
|
||||
220- ___| | | | _ \| |
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Connection: close
|
|||
This is not the real page
|
||||
</data>
|
||||
|
||||
# The second URL will get this response
|
||||
# The second URL gets this response
|
||||
<data1 crlf="headers">
|
||||
HTTP/1.1 401 Authorization Required swsclose
|
||||
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ lib%TESTNUMBER
|
|||
return failure immediately from progress callback
|
||||
</name>
|
||||
|
||||
# this server/host will not be used for real
|
||||
# this server/host is not used for real
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ resolve
|
|||
</info>
|
||||
|
||||
<reply>
|
||||
# Close the connection after the first request. Second request will happen after
|
||||
# Close the connection after the first request. Second request happens after
|
||||
# the DNS cache timeout elapses and must succeed exactly like the first one.
|
||||
<data1>
|
||||
HTTP/1.1 200 OK
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Content-Length: 26
|
|||
This is not the real page
|
||||
</data1002>
|
||||
|
||||
# The second request to the 1002 section will bounce this one back instead
|
||||
# The second request to the 1002 section bounces this one back instead
|
||||
# thanks to the swsbounce keyword up there
|
||||
<data1003 crlf="headers">
|
||||
HTTP/1.1 200 OK
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ lib%TESTNUMBER
|
|||
verify api is protected against calls from callbacks
|
||||
</name>
|
||||
|
||||
# this server/host will not be used for real
|
||||
# this server/host is not used for real
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ proxy
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP PUT from file with weird letters over a HTTP proxy
|
||||
HTTP PUT from file with weird letters over an HTTP proxy
|
||||
</name>
|
||||
<command>
|
||||
-x http://%HOSTIP:%HTTPPORT http://ssss/ -T %LOGDIR/%TESTNUMBERte[]st.txt
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ proxy
|
|||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
|
||||
# The second CONNECT will be made to the dynamic port number the FTP server
|
||||
# opens for us, so we cannot compare with a known pre-existing number!
|
||||
# The second CONNECT is made to the dynamic port number the FTP server
|
||||
# opens for us, so we cannot compare with a known pre-existing number.
|
||||
<strippart>
|
||||
s/((https.proxy):(\d+))/$2:12345/
|
||||
</strippart>
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ proxy
|
|||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
|
||||
# The second and third CONNECT will be made to the dynamic port number the FTP
|
||||
# server opens for us, so we cannot compare with known pre-existing numbers!
|
||||
# The second and third CONNECTs are made to the dynamic port number the FTP
|
||||
# server opens for us, so we cannot compare with known pre-existing numbers.
|
||||
|
||||
<strippart>
|
||||
s/((https.proxy):(\d+))/$2:12345/
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ FTP
|
|||
<reply>
|
||||
# The purpose of this test is to make sure the --proto-default option works
|
||||
# properly. We specify a default protocol of FTP and if the option works properly
|
||||
# curl will use the FTP protocol. If the option is broken however curl will use
|
||||
# curl uses the FTP protocol. If the option is broken however curl uses
|
||||
# the HTTP protocol.
|
||||
# In the broken scenario curl would use HTTP to talk to our FTP server. We handle
|
||||
# that by replying with something that both protocols can understand. Our FTP
|
||||
# server allows a custom welcome message, so we use that feature to make an HTTP
|
||||
# reply that contains an FTP reply (think polyglot). In the case of FTP we expect
|
||||
# curl will return CURLE_WEIRD_SERVER_REPLY so we test for that return code.
|
||||
# curl to return CURLE_WEIRD_SERVER_REPLY so we test for that return code.
|
||||
<servercmd>
|
||||
REPLY welcome HTTP/1.1 200 OK\r\nContent-Length: 21\r\n\r\n500 Weird FTP Reply
|
||||
</servercmd>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ hello
|
|||
|
||||
# Send a PINGRESP (0xD0) with remaining_length=2 in place of the
|
||||
# expected CONNACK. MQTT 3.1.1 s. 3.13.1 requires PINGRESP to have
|
||||
# remaining_length == 0. Curl must reject this with
|
||||
# remaining_length == 0. curl must reject this with
|
||||
# CURLE_WEIRD_SERVER_REPLY rather than dispatching to the CONNACK
|
||||
# handler.
|
||||
<servercmd>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ hello
|
|||
|
||||
# Send a DISCONNECT with remaining_length=2 after the PUBLISH.
|
||||
# MQTT 3.1.1 s. 3.14.1 requires DISCONNECT to have remaining_length == 0.
|
||||
# Curl must reject this with CURLE_WEIRD_SERVER_REPLY.
|
||||
# curl must reject this with CURLE_WEIRD_SERVER_REPLY.
|
||||
<servercmd>
|
||||
DISCONNECT-malformed TRUE
|
||||
</servercmd>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ WebSockets
|
|||
</keywords>
|
||||
</info>
|
||||
|
||||
# Sends a PING + a 5 byte hello TEXT
|
||||
# Sends a PING + a 5-byte hello TEXT
|
||||
<reply>
|
||||
<data crlf="headers" nocheck="yes" nonewline="yes">
|
||||
HTTP/1.1 101 Switching to WebSockets
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ upgrade
|
|||
</servercmd>
|
||||
|
||||
# Full list of frames: see 'verify.stdout' below
|
||||
# A 126 byte long PING
|
||||
# A 126-byte-long PING
|
||||
<data nocheck="yes" nonewline="yes">
|
||||
HTTP/1.1 101 Switching to WebSockets
|
||||
Server: server/%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ upgrade
|
|||
</servercmd>
|
||||
|
||||
# Full list of frames: see 'verify.stdout' below
|
||||
# A 126 byte long PONG
|
||||
# A 126-byte-long PONG
|
||||
<data nocheck="yes" nonewline="yes">
|
||||
HTTP/1.1 101 Switching to WebSockets
|
||||
Server: server/%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ upgrade
|
|||
</servercmd>
|
||||
|
||||
# Full list of frames: see 'verify.stdout' below
|
||||
# A 126 byte long CLOSE
|
||||
# A 126-byte-long CLOSE
|
||||
<data nocheck="yes" nonewline="yes">
|
||||
HTTP/1.1 101 Switching to WebSockets
|
||||
Server: server/%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ TFTP RRQ
|
|||
<reply>
|
||||
<data>
|
||||
A chunk of data which exactly fits into
|
||||
a 512 byte TFTP block, testing a boundary
|
||||
a 512-byte TFTP block, testing a boundary
|
||||
condition in the TFTP receive code.
|
||||
789ABCDEF
|
||||
123456789ABCDEF
|
||||
|
|
@ -47,7 +47,7 @@ condition in the TFTP receive code.
|
|||
tftp
|
||||
</server>
|
||||
<name>
|
||||
TFTP retrieve of boundary case 512 byte file
|
||||
TFTP retrieve of boundary case 512-byte file
|
||||
</name>
|
||||
<command>
|
||||
tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ TFTP WRQ
|
|||
tftp
|
||||
</server>
|
||||
<name>
|
||||
TFTP send of boundary case 512 byte file
|
||||
TFTP send of boundary case 512-byte file
|
||||
</name>
|
||||
<command>
|
||||
-T %LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//
|
||||
</command>
|
||||
<file name="%LOGDIR/test%TESTNUMBER.txt">
|
||||
A chunk of data which exactly fits into
|
||||
a 512 byte TFTP block, testing a boundary
|
||||
a 512-byte TFTP block, testing a boundary
|
||||
condition in the TFTP transmit code.
|
||||
89ABCDEF
|
||||
123456789ABCDEF
|
||||
|
|
@ -54,7 +54,7 @@ condition in the TFTP transmit code.
|
|||
<verify>
|
||||
<upload>
|
||||
A chunk of data which exactly fits into
|
||||
a 512 byte TFTP block, testing a boundary
|
||||
a 512-byte TFTP block, testing a boundary
|
||||
condition in the TFTP transmit code.
|
||||
89ABCDEF
|
||||
123456789ABCDEF
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Content-Length: 26
|
|||
This is not the real page
|
||||
</data1002>
|
||||
|
||||
# The second request to the 1002 section will bounce this one back instead
|
||||
# The second request to the 1002 section bounces this one back instead
|
||||
# thanks to the swsbounce keyword up there
|
||||
<data1003 crlf="headers">
|
||||
HTTP/1.1 200 OK
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ URL
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
65536 bytes long hostname in URL
|
||||
65536-byte-long hostname in URL
|
||||
</name>
|
||||
<file name="%LOGDIR/input%TESTNUM">
|
||||
url = http://%repeat[65536 x a]%/399
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ http
|
|||
HOME=%PWD/%LOGDIR
|
||||
</setenv>
|
||||
<name>
|
||||
IPFS malformed gw URL from multiline gateway file, first line no url
|
||||
IPFS malformed gw URL from multiline gateway file, first line no URL
|
||||
</name>
|
||||
<command>
|
||||
ipfs://bafybeidecnvkrygux6uoukouzps5ofkeevoqland7kopseiod6pzqvjg7u
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Funny-head: yesyes
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
--config with a 127 byte line
|
||||
--config with a 127-byte line
|
||||
</name>
|
||||
<file name="%LOGDIR/config" nonewline="yes">
|
||||
-A pointless
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ http
|
|||
http-proxy
|
||||
</server>
|
||||
<name>
|
||||
--netrc-file with a 127 byte line
|
||||
--netrc-file with a 127-byte line
|
||||
</name>
|
||||
<file name="%LOGDIR/netrc%TESTNUMBER" nonewline="yes">
|
||||
machine foo.host login foo password baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ IMAP CRAM-MD5 graceful cancellation
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "LOGOUT"
|
||||
# transfer and such a connection does not get a "LOGOUT"
|
||||
<protocol crlf="yes">
|
||||
A001 CAPABILITY
|
||||
A002 AUTHENTICATE CRAM-MD5
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ IMAP NTLM graceful cancellation
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "LOGOUT"
|
||||
# transfer and such a connection does not get a "LOGOUT"
|
||||
<protocol crlf="yes">
|
||||
A001 CAPABILITY
|
||||
A002 AUTHENTICATE NTLM
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ IMAP DIGEST-MD5 graceful cancellation
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "LOGOUT"
|
||||
# transfer and such a connection does not get a "LOGOUT"
|
||||
<protocol crlf="yes">
|
||||
A001 CAPABILITY
|
||||
A002 AUTHENTICATE DIGEST-MD5
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "LOGOUT"
|
||||
# transfer and such a connection does not get a "LOGOUT"
|
||||
<protocol crlf="yes">
|
||||
A001 CAPABILITY
|
||||
A002 AUTHENTICATE OAUTHBEARER
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "LOGOUT"
|
||||
# transfer and such a connection does not get a "LOGOUT"
|
||||
<protocol crlf="yes">
|
||||
A001 CAPABILITY
|
||||
A002 AUTHENTICATE OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ IMAP plain auth with alt authorization identity (Not authorized)
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "LOGOUT"
|
||||
# transfer and such a connection does not get a "LOGOUT"
|
||||
<protocol crlf="yes">
|
||||
A001 CAPABILITY
|
||||
A002 AUTHENTICATE PLAIN
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:wrong
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
USER user
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
AUTH CRAM-MD5
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
AUTH NTLM
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
AUTH DIGEST-MD5
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
AUTH OAUTHBEARER
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM --s
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%POP3PORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u kurt:xipj3plmq --sasl-authzid ursel
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
CAPA
|
||||
AUTH PLAIN
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
EHLO %TESTNUMBER
|
||||
AUTH CRAM-MD5
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
EHLO %TESTNUMBER
|
||||
AUTH NTLM
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
EHLO %TESTNUMBER
|
||||
AUTH DIGEST-MD5
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
EHLO %TESTNUMBER
|
||||
AUTH OAUTHBEARER
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
EHLO %TESTNUMBER
|
||||
AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr
|
|||
67
|
||||
</errorcode>
|
||||
# The multi interface considers a broken "CONNECT" as a prematurely broken
|
||||
# transfer and such a connection will not get a "QUIT"
|
||||
# transfer and such a connection does not get a "QUIT"
|
||||
<protocol crlf="yes">
|
||||
EHLO %TESTNUMBER
|
||||
AUTH PLAIN
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ echo "-----" > "$logfile"
|
|||
echo "Running $0 at $NOW" >> "$logfile"
|
||||
echo "Running $0 at $NOW"
|
||||
|
||||
# check we have the binaries needed and which TLS library we will be using
|
||||
# check we have the binaries needed and which TLS library we are using
|
||||
if [ -f "$OSSL"/libssl.so ]; then
|
||||
have_ossl="yes"
|
||||
fi
|
||||
|
|
@ -1083,7 +1083,7 @@ else
|
|||
echo "NOT all good, log in $logfile"
|
||||
fi
|
||||
|
||||
# send a mail to root (will be forwarded) but only once every 24 hours
|
||||
# send a mail to root (it is forwarded) but only once every 24 hours
|
||||
# 'cause we only really need "new" news
|
||||
itsnews="yes"
|
||||
age_of_news=0
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ static void usage_hx_download(const char *msg)
|
|||
" -r <host>:<port>:<addr> resolve information\n"
|
||||
" -T number max concurrent connections total\n"
|
||||
" -V http_version (http/1.1, h2, h3) http version to use\n"
|
||||
" -6 use ipv6 for resolving the FIRST url\n"
|
||||
" -6 use ipv6 for resolving the FIRST URL\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ void ws_close(CURL *curl); /* close the connection */
|
|||
* should be immediately followed by checking if 'res' variable has been
|
||||
* set.
|
||||
*
|
||||
* 'res' variable when set will hold a CURLcode, CURLMcode, or any of the
|
||||
* 'res' variable when set holds a CURLcode, CURLMcode, or any of the
|
||||
* TEST_ERR_* values defined above. It is advisable to return this value
|
||||
* as test result.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ static CURLcode test_lib1507(const char *URL)
|
|||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
case of (maxfd == -1), we call select(0, ...), which is equal to sleep.
|
||||
*/
|
||||
|
||||
rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
|||
return 0;
|
||||
|
||||
if(pooh->sizeleft) {
|
||||
*ptr = pooh->readptr[0]; /* copy one single byte */
|
||||
pooh->readptr++; /* advance pointer */
|
||||
pooh->sizeleft--; /* less data left */
|
||||
return 1; /* we return 1 byte at a time! */
|
||||
*ptr = pooh->readptr[0]; /* copy one single byte */
|
||||
pooh->readptr++; /* advance pointer */
|
||||
pooh->sizeleft--; /* less data left */
|
||||
return 1; /* we return 1 byte at a time! */
|
||||
}
|
||||
|
||||
return 0; /* no more data left to deliver */
|
||||
return 0; /* no more data left to deliver */
|
||||
}
|
||||
|
||||
static CURLcode test_lib1514(const char *URL)
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
|||
struct t1517_WriteThis *pooh = (struct t1517_WriteThis *)userp;
|
||||
size_t tocopy = size * nmemb;
|
||||
|
||||
/* Wait one second before return POST data *
|
||||
* so libcurl will wait before sending request body */
|
||||
/* Wait one second before return POST data
|
||||
so libcurl waits before sending request body */
|
||||
curlx_wait_ms(1000);
|
||||
|
||||
if(tocopy < 1 || !pooh->sizeleft)
|
||||
|
|
@ -43,9 +43,9 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
|||
if(pooh->sizeleft < tocopy)
|
||||
tocopy = pooh->sizeleft;
|
||||
|
||||
memcpy(ptr, pooh->readptr, tocopy);/* copy requested data */
|
||||
pooh->readptr += tocopy; /* advance pointer */
|
||||
pooh->sizeleft -= tocopy; /* less data left */
|
||||
memcpy(ptr, pooh->readptr, tocopy); /* copy requested data */
|
||||
pooh->readptr += tocopy; /* advance pointer */
|
||||
pooh->sizeleft -= tocopy; /* less data left */
|
||||
return tocopy;
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ static CURLcode test_lib1517(const char *URL)
|
|||
test_setopt(curl, CURLOPT_FAILONERROR, 1L);
|
||||
#endif
|
||||
|
||||
/* Perform the request, result will get the return code */
|
||||
/* Perform the request, result gets the return code */
|
||||
result = curl_easy_perform(curl);
|
||||
|
||||
test_cleanup:
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static CURLcode test_lib1518(const char *URL)
|
|||
test_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L);
|
||||
}
|
||||
|
||||
/* Perform the request, result will get the return code */
|
||||
/* Perform the request, result gets the return code */
|
||||
result = curl_easy_perform(curl);
|
||||
if(result)
|
||||
goto test_cleanup;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* This unit test PUT http data over proxy. Proxy header will be different
|
||||
* This unit test PUT http data over proxy. Proxy header is different
|
||||
* from server http header
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* This unit test PUT http data over proxy. Proxy header will be different
|
||||
* This unit test PUT http data over proxy. Proxy header is different
|
||||
* from server http header
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* This unit test PUT http data over proxy. Same http header will be generated
|
||||
* This unit test PUT http data over proxy. Same http header is generated
|
||||
* for server and proxy
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ static CURLcode test_lib1554(const char *URL)
|
|||
curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t1554_test_lock);
|
||||
curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, t1554_test_unlock);
|
||||
|
||||
/* Loop the transfer and cleanup the handle properly every lap. This will
|
||||
still reuse connections since the pool is in the shared object! */
|
||||
/* Loop the transfer and cleanup the handle properly every lap. This
|
||||
still reuses connections since the pool is in the shared object! */
|
||||
|
||||
for(i = 0; i < 3; i++) {
|
||||
CURL *curl = curl_easy_init();
|
||||
|
|
@ -83,7 +83,7 @@ static CURLcode test_lib1554(const char *URL)
|
|||
/* use the share object */
|
||||
curl_easy_setopt(curl, CURLOPT_SHARE, share);
|
||||
|
||||
/* Perform the request, result will get the return code */
|
||||
/* Perform the request, result gets the return code */
|
||||
result = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static CURLcode test_lib1557(const char *URL)
|
|||
|
||||
multi_remove_handle(multi, curl2);
|
||||
|
||||
/* If curl2 is still in the connect-pending list, this will crash */
|
||||
/* If curl2 is still in the connect-pending list, this crashes */
|
||||
multi_remove_handle(multi, curl1);
|
||||
|
||||
test_cleanup:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
*
|
||||
* Since the URL parser by default only accepts schemes that *this instance*
|
||||
* of libcurl supports, make sure that the test1560 file lists all the schemes
|
||||
* that this test will assume to be present!
|
||||
* that this test assumes to be present!
|
||||
*/
|
||||
|
||||
#include "first.h"
|
||||
|
|
@ -201,7 +201,7 @@ static const struct testcase get_parts_list[] = {
|
|||
"",
|
||||
0, 0, CURLUE_BAD_HOSTNAME },
|
||||
{ /* Host starting with a dash (RFC 1123 technically allows it, but many
|
||||
parsers don't) */
|
||||
parsers do not) */
|
||||
"http://-atest/",
|
||||
"http | [11] | [12] | [13] | -atest | [15] | / | [16] | [17]",
|
||||
0, 0, CURLUE_OK },
|
||||
|
|
@ -825,7 +825,7 @@ static const struct urltestcase get_url_list[] = {
|
|||
{"https://0xff.0xff.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK},
|
||||
{"https://0XFF.0XFF.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK},
|
||||
{"https://1.0xffffff", "https://1.255.255.255/", 0, 0, CURLUE_OK},
|
||||
/* IPv4 numerical overflows or syntax errors will not normalize */
|
||||
/* IPv4 numerical overflows or syntax errors do not normalize */
|
||||
{"https://a127.0.0.1", "https://a127.0.0.1/", 0, 0, CURLUE_OK},
|
||||
{"https://\xff.127.0.0.1", "https://%FF.127.0.0.1/", 0, CURLU_URLENCODE,
|
||||
CURLUE_OK},
|
||||
|
|
@ -1070,7 +1070,7 @@ static const struct setcase set_parts_list[] = {
|
|||
"https://example.com/one%20/$!$&'()*+;=:@{}[]%25",
|
||||
0, CURLU_URLENCODE, CURLUE_OK, CURLUE_OK},
|
||||
{NULL, /* start fresh! */
|
||||
"scheme=https,path=/,url=\"\",", /* incomplete url, redirect to "" */
|
||||
"scheme=https,path=/,url=\"\",", /* incomplete URL, redirect to "" */
|
||||
"https://example.com/",
|
||||
0, 0, CURLUE_OK, CURLUE_MALFORMED_INPUT},
|
||||
{NULL, /* start fresh! */
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static CURLcode test_lib1588(const char *URL)
|
|||
curl_msnprintf(proxy2_resolve, sizeof(proxy2_resolve),
|
||||
"secondproxy:%s:%s", libtest_arg3, libtest_arg2);
|
||||
|
||||
/* we connect to the fake host name but the right port number */
|
||||
/* we connect to the fake hostname but the right port number */
|
||||
curl_msnprintf(proxy1_connect, sizeof(proxy1_connect),
|
||||
"firstproxy:%s", libtest_arg3);
|
||||
curl_msnprintf(proxy2_connect, sizeof(proxy2_connect),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* This unit test PUT http data over proxy. Proxy header will be different
|
||||
* This unit test PUT http data over proxy. Proxy header is different
|
||||
* from server http header
|
||||
*/
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue