badwords: check indented lines in source code, fix fallouts

- badwords.pl: add `-a` option to check all lines in source code files.
  Before this patch indented lines were skipped (to avoid Markdown code
  fences.)
- GHA/checksrc: use `-a` when verifying the source code.
- GHA/checksrc: disable `So` and `But` rules for source code.
- GHA/checksrc: add docs/examples to the verified sources.
- badwords.txt: delete 4 duplicates.
- badwords.txt: group and sort contractions.
- badwords.txt: allow ` url = `, `DIR`, `<file name`.

Closes #19536
This commit is contained in:
Viktor Szakats 2025-11-14 17:55:33 +01:00
parent 8a968095df
commit 2dc71ba8bf
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
73 changed files with 146 additions and 144 deletions

View file

@ -559,7 +559,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
}
}
else {
/* IPv6 host name */
/* IPv6 hostname */
if(curlx_str_until(&p, &dsthost, MAX_IPADR_LEN, ']') ||
curlx_str_single(&p, ']')) {
infof(data, "Bad alt-svc IPv6 hostname, ignoring.");

View file

@ -311,7 +311,7 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf,
rc = nghttp2_session_callbacks_new(&cbs);
if(rc) {
failf(data, "Couldn't initialize nghttp2 callbacks");
failf(data, "Could not initialize nghttp2 callbacks");
goto out;
}
@ -331,7 +331,7 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf,
/* The nghttp2 session is not yet setup, do it */
rc = proxy_h2_client_new(cf, cbs);
if(rc) {
failf(data, "Couldn't initialize nghttp2");
failf(data, "Could not initialize nghttp2");
goto out;
}

View file

@ -664,7 +664,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
/* Do not fall back to treating it as a hostname */
char buffer[STRERROR_LEN];
data->state.os_errno = error = SOCKERRNO;
failf(data, "Couldn't bind to interface '%s' with errno %d: %s",
failf(data, "Could not bind to interface '%s' with errno %d: %s",
iface, error, curlx_strerror(error, buffer, sizeof(buffer)));
return CURLE_INTERFACE_FAILED;
}
@ -768,7 +768,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
char buffer[STRERROR_LEN];
data->state.errorbuf = FALSE;
data->state.os_errno = error = SOCKERRNO;
failf(data, "Couldn't bind to '%s' with errno %d: %s", host,
failf(data, "Could not bind to '%s' with errno %d: %s", host,
error, curlx_strerror(error, buffer, sizeof(buffer)));
return CURLE_INTERFACE_FAILED;
}

View file

@ -458,7 +458,7 @@ parse_cookie_header(struct Curl_easy *data,
*/
if(!co->name) {
/* The very first name/value pair is the actual cookie name */
/* The first name/value pair is the actual cookie name */
if(!sep)
/* Bad name/value pair. */
return CURLE_OK;

View file

@ -62,7 +62,7 @@ int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen)
if(strlen(force_hostname) < (size_t)namelen)
strcpy(name, force_hostname);
else
return 1; /* can't do it */
return 1; /* cannot do it */
err = 0;
}
else {

View file

@ -142,7 +142,7 @@ static bool fix_excessive_path(const TCHAR *in, TCHAR **out)
else if(!wcsncmp(fbuf, L"\\\\.\\", 4))
fbuf[2] = '?';
else if(!wcsncmp(fbuf, L"\\\\.", 3) || !wcsncmp(fbuf, L"\\\\?", 3)) {
/* Unexpected, not UNC. The formatting doc doesn't allow this AFAICT. */
/* Unexpected, not UNC. The formatting doc does not allow this AFAICT. */
goto cleanup;
}
else {

View file

@ -160,7 +160,7 @@ static char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
break;
}
else {
/* Lower-case digits. Can't use the set from mprintf.c since this
/* Lower-case digits. Cannot use the set from mprintf.c since this
needs to work as a curlx function */
static const unsigned char ldigits[] = "0123456789abcdef";

View file

@ -180,7 +180,7 @@ int r_getaddrinfo(const char *node,
curl_mfprintf(stderr, "ares_set_servers_ports_csv failed: %d", rc);
/* Cleanup */
ares_destroy(channel);
return EAI_MEMORY; /* we can't run */
return EAI_MEMORY; /* we cannot run */
}
}
}

View file

@ -275,7 +275,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
file->fd = fd;
if(!data->state.upload && (fd == -1)) {
failf(data, "Couldn't open file %s", data->state.up.path);
failf(data, "Could not open file %s", data->state.up.path);
file_done(data, CURLE_FILE_COULDNT_READ_FILE, FALSE);
return CURLE_FILE_COULDNT_READ_FILE;
}

View file

@ -1867,7 +1867,7 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
}
if(!*str) {
failf(data, "Couldn't interpret the 227-response");
failf(data, "Could not interpret the 227-response");
return CURLE_FTP_WEIRD_227_FORMAT;
}
@ -2202,7 +2202,7 @@ static CURLcode ftp_state_type_resp(struct Curl_easy *data,
/* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a
successful 'TYPE I'. While that is not as RFC959 says, it is still a
positive response code and we allow that. */
failf(data, "Couldn't set desired mode");
failf(data, "Could not set desired mode");
return CURLE_FTP_COULDNT_SET_TYPE;
}
if(ftpcode != 200)
@ -2392,7 +2392,7 @@ static CURLcode ftp_state_rest_resp(struct Curl_easy *data,
case FTP_RETR_REST:
if(ftpcode != 350) {
failf(data, "Couldn't use REST");
failf(data, "Could not use REST");
result = CURLE_FTP_COULDNT_USE_REST;
}
else {
@ -2537,7 +2537,7 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
}
else {
if((instate == FTP_LIST) && (ftpcode == 450)) {
/* simply no matching files in the dir listing */
/* simply no matching files in the directory listing */
ftp->transfer = PPTRANSFER_NONE; /* do not download anything */
ftp_state(data, ftpc, FTP_STOP); /* this phase is over */
}
@ -3052,7 +3052,7 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data,
case FTP_MKD:
if((ftpcode/100 != 2) && !ftpc->count3--) {
/* failure to MKD the dir */
/* failure to MKD the directory */
failf(data, "Failed to MKD dir: %03d", ftpcode);
result = CURLE_REMOTE_ACCESS_DENIED;
}
@ -3306,7 +3306,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
}
}
if(ftpc->prevpath)
infof(data, "Remembering we are in dir \"%s\"", ftpc->prevpath);
infof(data, "Remembering we are in directory \"%s\"", ftpc->prevpath);
}
/* shut down the socket to inform the server we are done */
@ -4192,7 +4192,7 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data,
ftpc->dirs[0].start = 0;
ftpc->dirs[0].len = (int)dirlen;
ftpc->dirdepth = 1; /* we consider it to be a single dir */
ftpc->dirdepth = 1; /* we consider it to be a single directory */
fileName = slashPos + 1; /* rest is filename */
}
else
@ -4208,7 +4208,7 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data,
size_t dirAlloc = numof_slashes(rawPath);
if(dirAlloc >= FTP_MAX_DIR_DEPTH)
/* suspiciously deep dir hierarchy */
/* suspiciously deep directory hierarchy */
return CURLE_URL_MALFORMAT;
if(dirAlloc) {

View file

@ -51,7 +51,7 @@ static void copy_header_external(struct Curl_header_store *hs,
h->index = index;
/* this will randomly OR a reserved bit for the sole purpose of making it
impossible for applications to do == comparisons, as that would otherwise
be very tempting and then lead to the reserved bits not being reserved
be tempting and then lead to the reserved bits not being reserved
anymore. */
h->origin = (unsigned int)(hs->type | (1 << 27));
h->anchor = e;

View file

@ -956,7 +956,7 @@ out:
/* we got a response, create a dns entry, add to cache, return */
dns = Curl_dnscache_mk_entry(data, addr, hostname, 0, port, FALSE);
if(!dns || Curl_dnscache_add(data, dns)) {
/* this is OOM or similar, don't store such negative resolves */
/* this is OOM or similar, do not store such negative resolves */
keep_negative = FALSE;
goto error;
}
@ -1393,7 +1393,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
error = FALSE;
err:
if(error) {
failf(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'",
failf(data, "Could not parse CURLOPT_RESOLVE entry '%s'",
hostp->data);
Curl_freeaddrinfo(head);
return CURLE_SETOPT_OPTION_SYNTAX;

View file

@ -277,7 +277,7 @@ struct stsentry *Curl_hsts(struct hsts *h, const char *hostname,
blen = ntail;
}
}
/* avoid curl_strequal because the host name is not null-terminated */
/* avoid curl_strequal because the hostname is not null-terminated */
if((hlen == ntail) && curl_strnequal(hostname, sts->host, hlen))
return sts;
}

View file

@ -504,7 +504,7 @@ static CURLcode http_perhapsrewind(struct Curl_easy *data,
return CURLE_OK;
if(abort_upload) {
/* We'd like to abort the upload - but should we? */
/* We would like to abort the upload - but should we? */
#ifdef USE_NTLM
if((data->state.authproxy.picked == CURLAUTH_NTLM) ||
(data->state.authhost.picked == CURLAUTH_NTLM)) {
@ -1716,7 +1716,7 @@ CURLcode Curl_add_custom_headers(struct Curl_easy *data,
curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE);
curlx_str_trimblanks(&val);
if(!curlx_strlen(&val))
/* no content, don't send this */
/* no content, do not send this */
continue;
}
else
@ -2404,7 +2404,7 @@ static CURLcode http_add_content_hds(struct Curl_easy *data,
(data->req.authneg ||
!Curl_checkheaders(data, STRCONST("Content-Length")))) {
/* we allow replacing this header if not during auth negotiation,
although it is not very wise to actually set your own */
although it is not wise to actually set your own */
result = curlx_dyn_addf(r, "Content-Length: %" FMT_OFF_T "\r\n",
req_clen);
}
@ -4018,7 +4018,7 @@ static CURLcode http_on_response(struct Curl_easy *data,
*
* The check for close above is done simply because of something
* else has already deemed the connection to get closed then
* something else should've considered the big picture and we
* something else should have considered the big picture and we
* avoid this check.
*
*/
@ -4187,7 +4187,7 @@ static CURLcode http_rw_hd(struct Curl_easy *data,
k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 +
(p[2] - '0');
/* RFC 9112 requires a single space following the status code,
but the browsers don't so let's not insist */
but the browsers do not so let's not insist */
fine_statusline = TRUE;
}
}

View file

@ -506,7 +506,7 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
rc = nghttp2_session_callbacks_new(&cbs);
if(rc) {
failf(data, "Couldn't initialize nghttp2 callbacks");
failf(data, "Could not initialize nghttp2 callbacks");
goto out;
}
@ -530,7 +530,7 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
/* The nghttp2 session is not yet setup, do it */
rc = h2_client_new(cf, cbs);
if(rc) {
failf(data, "Couldn't initialize nghttp2");
failf(data, "Could not initialize nghttp2");
goto out;
}
ctx->max_concurrent_streams = DEFAULT_MAX_CONCURRENT_STREAMS;
@ -972,7 +972,7 @@ static int push_promise(struct Curl_cfilter *cf,
rv = set_transfer_url(newhandle, &heads);
if(rv) {
CURL_TRC_CF(data, cf, "[%d] PUSH_PROMISE, failed to set url -> %d",
CURL_TRC_CF(data, cf, "[%d] PUSH_PROMISE, failed to set URL -> %d",
frame->promised_stream_id, rv);
discard_newhandle(cf, newhandle);
rv = CURL_PUSH_DENY;

View file

@ -1038,7 +1038,7 @@ CURLMcode Curl_multi_pollset(struct Curl_easy *data,
case MSTATE_RESOLVING:
result = Curl_resolv_pollset(data, ps);
/* connection filters are not involved in this phase. It's ok if we get no
/* connection filters are not involved in this phase. It is OK if we get no
* sockets to wait for. Resolving can wake up from other sources. */
expect_sockets = FALSE;
break;

View file

@ -340,7 +340,7 @@ static CURLMcode mev_pollset_diff(struct Curl_multi *multi,
/* What was the previous action the transfer had regarding this socket?
* If the transfer is new to the socket, disregard the information
* in `last_poll`, because the socket might have been destroyed and
* reopened. We'd have cleared the sh_entry for that, but the socket
* reopened. We would have cleared the sh_entry for that, but the socket
* might still be mentioned in the hashed pollsets. */
last_action = 0;
if(first_time) {

View file

@ -1742,9 +1742,8 @@ static CURLcode pop3_write(struct Curl_easy *data, const char *str,
/* Did we have a partial match which has subsequently failed? */
if(prev && prev >= pop3c->eob) {
/* Strip can only be non-zero for the very first mismatch after CRLF
and then both prev and strip are equal and nothing will be output
below */
/* Strip can only be non-zero for the first mismatch after CRLF and
then both prev and strip are equal and nothing will be output below */
while(prev && pop3c->strip) {
prev--;
pop3c->strip--;

View file

@ -280,7 +280,7 @@ timediff_t Curl_pgrsLimitWaitTime(struct pgrs_dir *d,
should_ms = (timediff_t) (1000 * bytes / bytes_per_sec);
}
else {
/* very large `bytes`, first calc the seconds it should have taken.
/* large `bytes`, first calc the seconds it should have taken.
* if that is small enough, convert to milliseconds. */
should_ms = (timediff_t) (bytes / bytes_per_sec);
if(should_ms < TIMEDIFF_T_MAX/1000)

View file

@ -308,7 +308,7 @@ static CURLproxycode socks4_req_add_user(struct socks_state *sx,
return CURLPX_SEND_REQUEST;
}
else {
/* empty user name */
/* empty username */
unsigned char b = 0;
result = Curl_bufq_write(&sx->iobuf, &b, 1, &nwritten);
if(result || (nwritten != 1))

View file

@ -49,7 +49,7 @@ CURLcode Curl_speedcheck(struct Curl_easy *data,
if((data->progress.current_speed >= 0) && data->set.low_speed_time) {
if(data->progress.current_speed < data->set.low_speed_limit) {
if(!data->state.keeps_speed.tv_sec)
/* under the limit at this very moment */
/* under the limit at this moment */
data->state.keeps_speed = now;
else {
/* how long has it been under the limit */

View file

@ -1283,7 +1283,7 @@ static bool url_match_result(bool result, void *userdata)
return TRUE;
}
else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
/* We've seen a single-use, existing connection to the destination and
/* We have seen a single-use, existing connection to the destination and
* no multiplexed one. It seems safe to assume that the server does
* not support multiplexing. */
match->wait_pipe = FALSE;
@ -2740,7 +2740,7 @@ static CURLcode override_login(struct Curl_easy *data,
data->set.str[STRING_NETRC_FILE]);
if(ret && ((ret == NETRC_NO_MATCH) ||
(data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
infof(data, "Couldn't find host %s in the %s file; using defaults",
infof(data, "Could not find host %s in the %s file; using defaults",
conn->host.name,
(data->set.str[STRING_NETRC_FILE] ?
data->set.str[STRING_NETRC_FILE] : ".netrc"));
@ -2752,7 +2752,7 @@ static CURLcode override_login(struct Curl_easy *data,
}
else {
if(!(conn->handler->flags&PROTOPT_USERPWDCTRL)) {
/* if the protocol can't handle control codes in credentials, make
/* if the protocol cannot handle control codes in credentials, make
sure there are none */
if(str_has_ctrl(*userp) || str_has_ctrl(*passwdp)) {
failf(data, "control code detected in .netrc credentials");

View file

@ -1940,7 +1940,7 @@ nomem:
if(!n)
bad = TRUE; /* empty hostname is not okay */
else if(!urlencode) {
/* if the host name part was not URL encoded here, it was set ready
/* if the hostname part was not URL encoded here, it was set ready
URL encoded so we need to decode it to check */
size_t dlen;
char *decoded = NULL;

View file

@ -216,7 +216,7 @@ static bool auth_digest_get_key_value(const char *chlg, const char *key,
if(curlx_str_cmp(&name, key)) {
/* if this is our key, return the value */
if(curlx_strlen(&data) >= buflen)
/* doesn't fit */
/* does not fit */
return FALSE;
memcpy(buf, curlx_str(&data), curlx_strlen(&data));
buf[curlx_strlen(&data)] = 0;

View file

@ -781,7 +781,7 @@ static CURLcode write_resp_raw(struct Curl_cfilter *cf,
if(nwritten < memlen) {
/* This MUST not happen. Our recbuf is dimensioned to hold the
* full max_stream_window and then some for this very reason. */
* full max_stream_window and then some for this reason. */
DEBUGASSERT(0);
return CURLE_RECV_ERROR;
}

View file

@ -342,7 +342,7 @@ static CURLcode write_resp_raw(struct Curl_cfilter *cf,
if(nwritten < memlen) {
/* This MUST not happen. Our recbuf is dimensioned to hold the
* full max_stream_window and then some for this very reason. */
* full max_stream_window and then some for this reason. */
DEBUGASSERT(0);
return CURLE_RECV_ERROR;
}

View file

@ -1574,8 +1574,8 @@ static int myssh_in_SFTP_QUOTE(struct Curl_easy *data,
Curl_debug(data, CURLINFO_HEADER_OUT, "PWD\n", 4);
Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
/* this sends an FTP-like "header" to the header callback so that the
current directory can be read very similar to how it is read when
/* this sends an FTP-like "header" to the header callback so that
the current directory can be read similar to how it is read when
using ordinary FTP. */
result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
free(tmp);
@ -1860,7 +1860,7 @@ static int myssh_in_SFTP_QUOTE_STAT(struct Curl_easy *data,
return SSH_NO_ERROR;
}
if(date > UINT_MAX)
/* because the liubssh API can't deal with a larger value */
/* because the liubssh API cannot deal with a larger value */
date = UINT_MAX;
if(!strncmp(cmd, "atime", 5))
sshc->quote_attrs->atime = (uint32_t)date;

View file

@ -878,8 +878,8 @@ static CURLcode sftp_quote(struct Curl_easy *data,
Curl_debug(data, CURLINFO_HEADER_OUT, "PWD\n", 4);
Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
/* this sends an FTP-like "header" to the header callback so that the
current directory can be read very similar to how it is read when
/* this sends an FTP-like "header" to the header callback so that
the current directory can be read similar to how it is read when
using ordinary FTP. */
result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
free(tmp);

View file

@ -148,7 +148,7 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
* add `kSecRevocationRequirePositiveResponse` to the Apple
* Trust policies, it interprets this as it NEEDs a confirmation
* of a cert being NOT REVOKED. Which not in general available for
* certificates on the internet.
* certificates on the Internet.
* It seems that applications using this policy are expected to PIN
* their certificate public keys or verification will fail.
* This does not seem to be what we want here. */

View file

@ -1688,7 +1688,7 @@ static CURLcode client_cert(struct Curl_easy *data,
failf(data,
"could not load PEM client certificate from %s, " OSSL_PACKAGE
" error %s, "
"(no key found, wrong pass phrase, or wrong file format?)",
"(no key found, wrong passphrase, or wrong file format?)",
(cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
ossl_strerror(ERR_get_error(), error_buffer,
sizeof(error_buffer)) );
@ -1708,7 +1708,7 @@ static CURLcode client_cert(struct Curl_easy *data,
failf(data,
"could not load ASN1 client certificate from %s, " OSSL_PACKAGE
" error %s, "
"(no key found, wrong pass phrase, or wrong file format?)",
"(no key found, wrong passphrase, or wrong file format?)",
(cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
ossl_strerror(ERR_get_error(), error_buffer,
sizeof(error_buffer)) );
@ -5154,7 +5154,7 @@ CURLcode Curl_ossl_check_peer_cert(struct Curl_cfilter *cf,
#endif
if(data->set.ssl.certinfo && !octx->reused_session) {
/* asked to gather certificate info. Reused sessions don't have cert
/* asked to gather certificate info. Reused sessions do not have cert
chains */
result = ossl_certchain(data, octx->ssl);
if(result)
@ -5684,7 +5684,7 @@ static CURLcode ossl_get_channel_binding(struct Curl_easy *data, int sockindex,
cert = SSL_get1_peer_certificate(octx->ssl);
if(!cert)
/* No server certificate, don't do channel binding */
/* No server certificate, do not do channel binding */
return CURLE_OK;
if(!OBJ_find_sigid_algs(X509_get_signature_nid(cert), &algo_nid, NULL)) {

View file

@ -1286,7 +1286,7 @@ schannel_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
/* The socket must be writeable (or a poll error occurred) before we call
InitializeSecurityContext to continue processing the received TLS
records. This is because that function is not idempotent and we don't
records. This is because that function is not idempotent and we do not
support partial save/resume sending replies of handshake tokens. */
if(!SOCKET_WRITABLE(Curl_conn_cf_get_socket(cf, data), 0)) {
SCH_DEV(infof(data, "schannel: handshake waiting for writeable socket"));
@ -1809,7 +1809,7 @@ schannel_recv_renegotiate(struct Curl_cfilter *cf, struct Curl_easy *data,
* data needs to be sent then we block for a writeable socket that should
* be writeable immediately except for OS resource constraints. For caller
* send if handshake data needs to be received then we block for a readable
* socket, which could take some time, but it's more likely the user has
* socket, which could take some time, but it is more likely the user has
* called recv since they had called it prior (only recv can start
* renegotiation and probably the user is going to call it again to get
* more of their data before calling send).

View file

@ -1423,7 +1423,7 @@ static CURLcode ssl_cf_connect_deferred(struct Curl_cfilter *cf,
result = ssl_cf_set_earlydata(cf, data, buf, blen);
if(result)
return result;
/* we buffered any early data we'd like to send. Actually
/* we buffered any early data we would like to send. Actually
* do the connect now which sends it and performs the handshake. */
connssl->earlydata_state = ssl_earlydata_sending;
connssl->earlydata_skip = Curl_bufq_len(&connssl->earlydata);

View file

@ -1725,7 +1725,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf,
if(ret == WOLFSSL_SUCCESS &&
conn_config->verifyhost &&
!connssl->peer.sni) {
/* we have an IP address as host name. */
/* we have an IP address as hostname. */
WOLFSSL_X509* cert = wolfSSL_get_peer_certificate(wssl->ssl);
if(!cert) {
failf(data, "unable to get peer certificate");

View file

@ -1037,7 +1037,7 @@ static CURLcode ws_enc_send(struct Curl_easy *data,
* that needs to be encoded into the buffer */
if(buflen < ws->sendbuf_payload) {
/* We have been called with LESS buffer data than before. This
* is not how it's supposed too work. */
* is not how it is supposed too work. */
failf(data, "[WS] curl_ws_send() called with smaller 'buflen' than "
"bytes already buffered in previous call, %zu vs %zu",
buflen, ws->sendbuf_payload);