stop using the word 'just'

Everywhere. In documentation and code comments.

It is almost never a good word and almost always a filler that should be
avoided.

Closes #20793
This commit is contained in:
Daniel Stenberg 2026-03-02 23:41:35 +01:00
parent 4b583b7585
commit b4dba346cd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
213 changed files with 727 additions and 772 deletions

View file

@ -42,7 +42,7 @@ set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
)
if(CURL_BUILD_TESTING)
# special libcurlu library just for unittests
# special libcurlu library for unittests
add_library(curlu STATIC EXCLUDE_FROM_ALL ${HHEADERS} ${CSOURCES})
target_compile_definitions(curlu PUBLIC "CURL_STATICLIB" "UNITTESTS")
target_link_libraries(curlu PUBLIC ${CURL_LIBS})

View file

@ -175,7 +175,7 @@ static CURLcode altsvc_add(struct altsvcinfo *asi, const char *line)
(size_t)srcport, (size_t)dstport);
if(as) {
as->expires = expires;
as->prio = 0; /* not supported to just set zero */
as->prio = 0; /* not supported, set zero */
as->persist = persist ? 1 : 0;
Curl_llist_append(&asi->list, as, &as->node);
}

View file

@ -28,7 +28,7 @@
* Telnet option defines. Add more here if in need.
*/
#define CURL_TELOPT_BINARY 0 /* binary 8-bit data */
#define CURL_TELOPT_ECHO 1 /* just echo! */
#define CURL_TELOPT_ECHO 1 /* echo */
#define CURL_TELOPT_SGA 3 /* Suppress Go Ahead */
#define CURL_TELOPT_EXOPL 255 /* EXtended OPtions List */
#define CURL_TELOPT_TTYPE 24 /* Terminal TYPE */

View file

@ -416,8 +416,8 @@ CURLcode Curl_async_await(struct Curl_easy *data,
real_timeout = ares_timeout(ares->channel, &max_timeout, &time_buf);
/* use the timeout period ares returned to us above if less than one
second is left, otherwise just use 1000ms to make sure the progress
callback gets called frequent enough */
second is left, otherwise use 1000ms to make sure the progress callback
gets called frequent enough */
if(!real_timeout->tv_sec)
call_timeout_ms = (timediff_t)(real_timeout->tv_usec / 1000);
else
@ -544,12 +544,11 @@ static void async_ares_hostbyname_cb(void *user_data,
talking to a pool of DNS servers that can only successfully resolve
IPv4 address, for example).
it is also possible that the other request could always just take
longer because it needs more time or only the second DNS server can
fulfill it successfully. But, to align with the philosophy of Happy
Eyeballs, we do not want to wait _too_ long or users will think
requests are slow when IPv6 lookups do not actually work (but IPv4
ones do).
it is also possible that the other request could always take longer
because it needs more time or only the second DNS server can fulfill it
successfully. But, to align with the philosophy of Happy Eyeballs, we
do not want to wait _too_ long or users will think requests are slow
when IPv6 lookups do not actually work (but IPv4 ones do).
So, now that we have a usable answer (some IPv4 addresses, some IPv6
addresses, or "no such domain"), we start a timeout for the remaining
@ -564,17 +563,16 @@ static void async_ares_hostbyname_cb(void *user_data,
us that, given usable information in hand, we simply do not want to
wait "too much longer" after we get a result.
We simply wait an additional amount of time equal to the default
c-ares query timeout. That is enough time for a typical parallel
response to arrive without being "too long". Even on a network
where one of the two types of queries is failing or timing out
constantly, this will usually mean we wait a total of the default
c-ares timeout (5 seconds) plus the round trip time for the successful
request, which seems bearable. The downside is that c-ares might race
with us to issue one more retry just before we give up, but it seems
better to "waste" that request instead of trying to guess the perfect
timeout to prevent it. After all, we do not even know where in the
c-ares retry cycle each request is.
We simply wait an additional amount of time equal to the default c-ares
query timeout. That is enough time for a typical parallel response to
arrive without being "too long". Even on a network where one of the two
types of queries is failing or timing out constantly, this will usually
mean we wait a total of the default c-ares timeout (5 seconds) plus the
round trip time for the successful request, which seems bearable. The
downside is that c-ares might race with us to issue one more retry
before we give up, but it seems better to "waste" that request instead
of trying to guess the perfect timeout to prevent it. After all, we do
not even know where in the c-ares retry cycle each request is.
*/
ares->happy_eyeballs_dns_time = *Curl_pgrs_now(data);
Curl_expire(data, HAPPY_EYEBALLS_DNS_TIMEOUT, EXPIRE_HAPPY_EYEBALLS_DNS);
@ -845,7 +843,7 @@ static CURLcode async_ares_set_dns_servers(struct Curl_easy *data,
}
#ifdef HAVE_CARES_SERVERS_CSV
/* if channel is not there, this is just a parameter check */
/* if channel is not there, this is a parameter check */
if(ares->channel)
#ifdef HAVE_CARES_PORTS_CSV
ares_result = ares_set_servers_ports_csv(ares->channel, servers);
@ -888,7 +886,7 @@ CURLcode Curl_async_ares_set_dns_interface(struct Curl_easy *data)
if(!interf)
interf = "";
/* if channel is not there, this is just a parameter check */
/* if channel is not there, this is a parameter check */
if(ares->channel)
ares_set_local_dev(ares->channel, interf);
@ -917,7 +915,7 @@ CURLcode Curl_async_ares_set_dns_local_ip4(struct Curl_easy *data)
}
}
/* if channel is not there yet, this is just a parameter check */
/* if channel is not there yet, this is a parameter check */
if(ares->channel)
ares_set_local_ip4(ares->channel, ntohl(a4.s_addr));
@ -947,7 +945,7 @@ CURLcode Curl_async_ares_set_dns_local_ip6(struct Curl_easy *data)
}
}
/* if channel is not there, this is just a parameter check */
/* if channel is not there, this is a parameter check */
if(ares->channel)
ares_set_local_ip6(ares->channel, a6);

View file

@ -197,9 +197,8 @@ bool Curl_bufq_peek_at(struct bufq *q, size_t offset,
const uint8_t **pbuf, size_t *plen);
/**
* Tell the buffer queue to discard `amount` buf bytes at the head
* of the queue. Skipping more buf than is currently buffered will
* just empty the queue.
* Tell the buffer queue to discard `amount` buf bytes at the head of the
* queue. Skipping more buf than is currently buffered will empty the queue.
*/
void Curl_bufq_skip(struct bufq *q, size_t amount);

View file

@ -206,9 +206,8 @@ static CURLcode start_CONNECT(struct Curl_cfilter *cf,
int http_minor;
CURLcode result;
/* This only happens if we have looped here due to authentication
reasons, and we do not really use the newly cloned URL here
then. Just free it. */
/* This only happens if we have looped here due to authentication reasons,
and we do not really use the newly cloned URL here then. Free it. */
Curl_safefree(data->req.newurl);
result = Curl_http_proxy_create_CONNECT(&req, cf, data, 1);

View file

@ -580,7 +580,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
* This binds the local socket to a particular interface. This will
* force even requests to other local interfaces to go out the external
* interface. Only bind to the interface when specified as interface,
* not just as a hostname or ip address.
* not as a hostname or ip address.
*
* The interface might be a VRF, eg: vrf-blue, which means it cannot be
* converted to an IP address and would fail Curl_if2ip. Simply try to
@ -798,7 +798,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
*
* "I do not have Rational Quantify, but the hint from his post was
* ntdll::NtRemoveIoCompletion(). I would assume the SleepEx (or maybe
* just Sleep(0) would be enough?) would release whatever
* Sleep(0) would be enough?) would release whatever
* mutex/critical-section the ntdll call is waiting on.
*
* Someone got to verify this on Win-NT 4.0, 2000."
@ -1445,7 +1445,7 @@ static CURLcode cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
(SOCKEINPROGRESS == sockerr)
#endif
) {
/* this is just a case of EWOULDBLOCK */
/* EWOULDBLOCK */
result = CURLE_AGAIN;
}
else {
@ -1510,7 +1510,7 @@ static CURLcode cf_socket_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
(EAGAIN == sockerr) || (SOCKEINTR == sockerr)
#endif
) {
/* this is just a case of EWOULDBLOCK */
/* EWOULDBLOCK */
result = CURLE_AGAIN;
}
else {

View file

@ -193,7 +193,7 @@ static CURLcode inflate_stream(struct Curl_easy *data,
done = FALSE;
break;
case Z_BUF_ERROR:
/* No more data to flush: just exit loop. */
/* No more data to flush: exit loop. */
break;
case Z_STREAM_END:
result = process_trailer(data, zp);

View file

@ -366,8 +366,7 @@ static bool invalid_octets(const char *ptr, size_t len)
/* The maximum length we accept a date string for the 'expire' keyword. The
standard date formats are within the 30 bytes range. This adds an extra
margin just to make sure it realistically works with what is used out
there.
margin to make sure it realistically works with what is used out there.
*/
#define MAX_DATE_LENGTH 80
@ -1314,8 +1313,8 @@ CURLcode Curl_cookie_getlist(struct Curl_easy *data,
if(matches) {
/*
* Now we need to make sure that if there is a name appearing more than
* once, the longest specified path version comes first. To make this
* the swiftest way, we just sort them all based on path length.
* once, the longest specified path version comes first. To make this the
* swiftest way, we sort them all based on path length.
*/
struct Cookie **array;
size_t i;

View file

@ -331,7 +331,7 @@ void Curl_cshutdn_destroy(struct cshutdn *cshutdn,
{
if(cshutdn->initialised && data) {
int timeout_ms = 0;
/* Just for testing, run graceful shutdown */
/* for testing, run graceful shutdown */
#ifdef DEBUGBUILD
{
const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");

View file

@ -54,7 +54,7 @@ CURLcode Curl_range(struct Curl_easy *data)
else if(!first_num) {
/* -Y */
if(!to)
/* "-0" is just wrong */
/* "-0" is wrong */
return CURLE_RANGE_ERROR;
data->req.maxdownload = to;

View file

@ -708,7 +708,7 @@
#elif defined(USE_ARES)
# define CURLRES_ASYNCH
# define CURLRES_ARES
/* now undef the stock libc functions just to avoid them being used */
/* now undef the stock libc functions to avoid them being used */
# undef HAVE_GETADDRINFO
# undef HAVE_FREEADDRINFO
#else

View file

@ -53,7 +53,7 @@
* The bug was fixed in NetBSD 9.4 release, NetBSD 10.0 release,
* NetBSD 10.99.11 development.
* It is safe to apply the workaround even if the bug is not present, as
* the workaround just reduces performance slightly. */
* the workaround reduces performance slightly. */
# include <sys/param.h>
# if __NetBSD_Version__ < 904000000 || \
(__NetBSD_Version__ >= 999000000 && \

View file

@ -43,13 +43,13 @@
/*
* Internal function used for waiting a specific amount of ms in
* Curl_socket_check() and Curl_poll() when no file descriptor is provided to
* wait on, just being used to delay execution. Winsock select() and poll()
* timeout mechanisms need a valid socket descriptor in a not null file
* descriptor set to work. Waiting indefinitely with this function is not
* allowed, a zero or negative timeout value will return immediately. Timeout
* resolution, accuracy, as well as maximum supported value is system
* dependent, neither factor is a critical issue for the intended use of this
* function in the library.
* wait on, being used to delay execution. Winsock select() and poll() timeout
* mechanisms need a valid socket descriptor in a not null file descriptor set
* to work. Waiting indefinitely with this function is not allowed, a zero or
* negative timeout value will return immediately. Timeout resolution,
* accuracy, as well as maximum supported value is system dependent, neither
* factor is a critical issue for the intended use of this function in the
* library.
*
* Return values:
* -1 = system call error, or invalid timeout value

View file

@ -195,8 +195,8 @@ static CURLcode cw_out_cb_write(struct cw_out_ctx *ctx,
if(nwritten == CURL_WRITEFUNC_PAUSE) {
if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
/* Protocols that work without network cannot be paused. This is
actually only FILE:// just now, and it cannot pause since the
transfer is not done using the "normal" procedure. */
actually only FILE:// now, and it cannot pause since the transfer is
not done using the "normal" procedure. */
failf(data, "Write callback asked for PAUSE when not supported");
return CURLE_WRITE_ERROR;
}

View file

@ -689,10 +689,10 @@ static DOHcode doh_rdata(const unsigned char *doh,
return rc;
break;
case CURL_DNS_TYPE_DNAME:
/* explicit for clarity; just skip; rely on synthesized CNAME */
/* explicit for clarity; skip; rely on synthesized CNAME */
break;
default:
/* unsupported type, just skip it */
/* unsupported type, skip it */
break;
}
return DOH_OK;
@ -1048,9 +1048,9 @@ UNITTEST void de_cleanup(struct dohentry *d)
* The encoding here is defined in
* https://datatracker.ietf.org/doc/html/rfc1035#section-3.1
*
* The input buffer pointer will be modified so it points to
* just after the end of the DNS name encoding on output. (And
* that is why it is an "unsigned char **" :-)
* The input buffer pointer will be modified so it points to after the end of
* the DNS name encoding on output. (And that is why it is an "unsigned char
* **" :-)
*/
static CURLcode doh_decode_rdata_name(const unsigned char **buf,
size_t *remaining, char **dnsname)

View file

@ -153,16 +153,14 @@ CURLcode Curl_dynhds_cadd(struct dynhds *dynhds,
const char *name, const char *value);
/**
* Add a single header from an HTTP/1.1 formatted line at the end. Line
* may contain a delimiting CRLF or just LF. Any characters after
* that will be ignored.
* Add a single header from an HTTP/1.1 formatted line at the end. Line may
* contain a delimiting CRLF or LF. Any characters after that will be ignored.
*/
CURLcode Curl_dynhds_h1_cadd_line(struct dynhds *dynhds, const char *line);
/**
* Add a single header from an HTTP/1.1 formatted line at the end. Line
* may contain a delimiting CRLF or just LF. Any characters after
* that will be ignored.
* Add a single header from an HTTP/1.1 formatted line at the end. Line may
* contain a delimiting CRLF or LF. Any characters after that will be ignored.
*/
CURLcode Curl_dynhds_h1_add_line(struct dynhds *dynhds,
const char *line, size_t line_len);

View file

@ -724,7 +724,7 @@ static CURLcode easy_transfer(struct Curl_multi *multi)
* easy handle, destroys the multi handle and returns the easy handle's return
* code.
*
* REALITY: it cannot just create and destroy the multi handle that easily. It
* REALITY: it cannot create and destroy the multi handle that easily. It
* needs to keep it around since if this easy handle is used again by this
* function, the same multi handle must be reused so that the same pools and
* caches can be used.

View file

@ -168,10 +168,9 @@ static void free_formlist(struct FormInfo *ptr)
*
* Stores a formpost parameter and builds the appropriate linked list.
*
* Has two principal functionalities: using files and byte arrays as
* post parts. Byte arrays are either copied or just the pointer is stored
* (as the user requests) while for files only the filename and not the
* content is stored.
* Has two principal functionalities: using files and byte arrays as post
* parts. Byte arrays are either copied or the pointer is stored (as the user
* requests) while for files only the filename and not the content is stored.
*
* While you may have only one byte array for each name, multiple filenames
* are allowed (and because of this feature CURLFORM_END is needed after
@ -667,7 +666,7 @@ void curl_formfree(struct curl_httppost *form)
struct curl_httppost *next;
if(!form)
/* no form to free, just get out of this */
/* no form to free, get out of this */
return;
do {
@ -710,8 +709,8 @@ static CURLcode setname(curl_mimepart *part, const char *name, size_t len)
* mime part at '*finalform'.
*
* This function will not do a failf() for the potential memory failures but
* should for all other errors it spots. Just note that this function MAY get
* a NULL pointer in the 'data' argument.
* should for all other errors it spots. Note that this function MAY get a
* NULL pointer in the 'data' argument.
*/
CURLcode Curl_getformdata(CURL *data,

View file

@ -361,7 +361,7 @@ static void close_secondarysocket(struct Curl_easy *data,
/*
* Lineend Conversions
* On ASCII transfers, e.g. directory listings, we might get lines
* ending in '\r\n' and we prefer just '\n'.
* ending in '\r\n' and we prefer '\n'.
* We might also get a lonely '\r' which we convert into a '\n'.
*/
struct ftp_cw_lc_ctx {
@ -399,8 +399,8 @@ static CURLcode ftp_cw_lc_write(struct Curl_easy *data,
if(result)
return result;
}
/* either we just wrote the newline or it is part of the next
* chunk of bytes we write. */
/* either we wrote the newline or it is part of the next chunk of bytes
* we write. */
ctx->newline_pending = FALSE;
}
@ -633,8 +633,8 @@ static CURLcode getftpresponse(struct Curl_easy *data,
int *ftpcodep) /* return the ftp-code */
{
/*
* We cannot read just one byte per read() and then go back to select() as
* the OpenSSL read() does not grok that properly.
* We cannot read one byte per read() and then go back to select() as the
* OpenSSL read() does not grok that properly.
*
* Alas, read as much as possible, split up into lines, use the ending
* line in a response or continue reading. */
@ -676,10 +676,10 @@ static CURLcode getftpresponse(struct Curl_easy *data,
*
* A caution here is that the ftp_readresp() function has a cache that may
* contain pieces of a response from the previous invoke and we need to
* make sure we do not just wait for input while there is unhandled data in
* make sure we do not wait for input while there is unhandled data in
* that cache. But also, if the cache is there, we call ftp_readresp() and
* the cache was not good enough to continue we must not just busy-loop
* around this function.
* the cache was not good enough to continue we must not busy-loop around
* this function.
*
*/
@ -702,7 +702,7 @@ static CURLcode getftpresponse(struct Curl_easy *data,
}
else if(ev == 0) {
result = Curl_pgrsUpdate(data);
continue; /* just continue in our loop for the timeout duration */
continue; /* continue in our loop for the timeout duration */
}
}
@ -782,8 +782,8 @@ static CURLcode ftp_domore_pollset(struct Curl_easy *data,
return CURLE_OK;
/* When in DO_MORE state, we could be either waiting for us to connect to a
* remote site, or we could wait for that site to connect to us. Or just
* handle ordinary commands.
* remote site, or we could wait for that site to connect to us. Or handle
* ordinary commands.
*/
CURL_TRC_FTP(data, "[%s] ftp_domore_pollset()", FTP_CSTATE(ftpc));
@ -1552,7 +1552,7 @@ static CURLcode ftp_state_list(struct Curl_easy *data,
Whether the server will support this, is uncertain.
The other ftp_filemethods will CWD into dir/dir/ first and
then just do LIST (in that case: nothing to do here)
then do LIST (in that case: nothing to do here)
*/
const char *lstArg = NULL;
int lstArglen = 0;
@ -1688,9 +1688,9 @@ static CURLcode ftp_state_ul_setup(struct Curl_easy *data,
which may not exist in the server! The SIZE command is not in
RFC959. */
/* 2. This used to set REST. But since we can do append, we
do not another ftp command. We just skip the source file
offset and then we APPEND the rest on the file instead */
/* 2. This used to set REST. But since we can do append, we issue no
another ftp command. Skip the source file offset and APPEND the rest on
the file instead */
/* 3. pass file-size number of bytes in the source file */
/* 4. lower the infilesize counter */
@ -1791,10 +1791,10 @@ static CURLcode ftp_state_retr(struct Curl_easy *data,
this even when not doing resumes. */
if(filesize == -1) {
infof(data, "ftp server does not support SIZE");
/* We could not get the size and therefore we cannot know if there really
is a part of the file left to get, although the server will just
close the connection when we start the connection so it will not cause
us any harm, just not make us exit as nicely. */
/* We could not get the size and therefore we cannot know if there
really is a part of the file left to get, although the server will
close the connection when we start the connection so it will not
cause us any harm, not make us exit as nicely. */
}
else {
/* We got a file size report, so we check that there actually is a
@ -2392,7 +2392,7 @@ static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
if(result)
return result;
}
/* otherwise just fall through */
/* otherwise fall through */
}
else {
if(data->set.prequote && !ftpc->file) {
@ -2971,7 +2971,7 @@ static CURLcode ftp_state_user_resp(struct Curl_easy *data,
{
CURLcode result = CURLE_OK;
/* some need password anyway, and others just return 2xx ignored */
/* some need password anyway, and others return 2xx ignored */
if((ftpcode == 331) && (ftpc->state == FTP_USER)) {
/* 331 Password required for ...
(the server requires to send the user's password too) */
@ -3742,9 +3742,9 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
if(!result && (ftp->transfer == PPTRANSFER_BODY) && ftpc->ctl_valid &&
pp->pending_resp && !premature) {
/*
* Let's see what the server says about the transfer we just performed,
* but lower the timeout as sometimes this connection has died while the
* data has been transferred. This happens when doing through NATs etc that
* Let's see what the server says about the transfer we performed, but
* lower the timeout as sometimes this connection has died while the data
* has been transferred. This happens when doing through NATs etc that
* abandon old silent connections.
*/
pp->response = *Curl_pgrs_now(data); /* timeout relative now */
@ -3760,7 +3760,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
return result;
if(ftpc->dont_check && data->req.maxdownload > 0) {
/* we have just sent ABOR and there is no reliable way to check if it was
/* we have sent ABOR and there is no reliable way to check if it was
* successful or not; we have to close the connection now */
infof(data, "partial download completed, closing connection");
connclose(conn, "Partial download with no ability to check");
@ -4303,7 +4303,7 @@ static CURLcode ftp_disconnect(struct Curl_easy *data,
disconnect wait in vain and cause more problems than we need to.
ftp_quit() will check the state of ftp->ctl_valid. If it is ok it
will try to send the QUIT command, otherwise it will just return.
will try to send the QUIT command, otherwise it will return.
*/
ftpc->shutdown = TRUE;
if(dead_connection || Curl_pp_needs_flush(data, &ftpc->pp))

View file

@ -107,8 +107,8 @@ struct FTP {
char *path; /* points to the urlpieces struct field */
char *pathalloc; /* if non-NULL a pointer to an allocated path */
/* transfer a file/body or not, done as a typedefed enum just to make
debuggers display the full symbol and not just the numerical value */
/* transfer a file/body or not, done as a typedefed enum to make debuggers
display the full symbol and not the numerical value */
curl_pp_transfer transfer;
curl_off_t downloadsize;
};
@ -151,7 +151,7 @@ struct ftp_conn {
BIT(ftp_trying_alternative);
BIT(dont_check); /* Set to TRUE to prevent the final (post-transfer)
file size and 226/250 status check. It should still
read the line, just ignore the result. */
read the line, ignore the result. */
BIT(ctl_valid); /* Tells Curl_ftp_quit() whether or not to do anything. If
the connection has timed out or been closed, this
should be FALSE when it gets to Curl_ftp_quit() */

View file

@ -1366,7 +1366,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
if(curlx_str_until(&host, &target, 4096, ',')) {
if(curlx_str_single(&host, ','))
goto err;
/* survive nothing but just a comma */
/* survive nothing but a comma */
continue;
}
}

View file

@ -206,7 +206,7 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname,
/* check if it already exists */
sts = Curl_hsts(h, hostname, hlen, FALSE);
if(sts) {
/* just update these fields */
/* update these fields */
sts->expires = expires;
sts->includeSubDomains = subdomains;
}
@ -456,7 +456,7 @@ static CURLcode hsts_pull(struct Curl_easy *data, struct hsts *h)
e.namelen = sizeof(buffer) - 1;
e.includeSubDomains = FALSE; /* default */
e.expire[0] = 0;
e.name[0] = 0; /* just to make it clean */
e.name[0] = 0; /* to make it clean */
sc = data->set.hsts_read(data, &e, data->set.hsts_read_userp);
if(sc == CURLSTS_OK) {
time_t expires = 0;

View file

@ -394,7 +394,7 @@ static CURLcode http_perhapsrewind(struct Curl_easy *data,
VERBOSE(const char *ongoing_auth = NULL);
/* We need a rewind before uploading client read data again. The
* checks below just influence of the upload is to be continued
* checks below influence of the upload is to be continued
* or aborted early.
* This depends on how much remains to be sent and in what state
* the authentication is. Some auth schemes such as NTLM do not work
@ -1195,7 +1195,7 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl,
}
/* the URL could not be parsed for some reason, but since this is FAKE
mode, just duplicate the field as-is */
mode, duplicate the field as-is */
follow_url = curlx_strdup(newurl);
if(!follow_url)
return CURLE_OUT_OF_MEMORY;
@ -2418,7 +2418,7 @@ static CURLcode addexpect(struct Curl_easy *data, struct dynbuf *r,
return CURLE_OK;
/* For really small puts we do not use Expect: headers at all, and for
the somewhat bigger ones we allow the app to disable it. Just make
the somewhat bigger ones we allow the app to disable it. Make
sure that the expect100header is always set to the preferred value
here. */
ptr = Curl_checkheaders(data, STRCONST("Expect"));
@ -2641,8 +2641,8 @@ static CURLcode http_range(struct Curl_easy *data,
data->state.range, total_len - 1, total_len);
}
else {
/* Range was selected and then we just pass the incoming range and
append total size */
/* Range was selected and then we pass the incoming range and append
total size */
data->state.aptr.rangeline =
curl_maprintf("Content-Range: bytes %s/%" FMT_OFF_T "\r\n",
data->state.range, req_clen);
@ -3278,7 +3278,7 @@ static CURLcode http_header_c(struct Curl_easy *data,
return CURLE_OK;
}
}
/* negative, different value or just rubbish - bad HTTP */
/* negative, different value or rubbish - bad HTTP */
failf(data, "Invalid Content-Length: value");
return CURLE_WEIRD_SERVER_REPLY;
}
@ -3757,8 +3757,8 @@ static CURLcode http_statusline(struct Curl_easy *data,
*/
if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
k->httpcode == 416) {
/* "Requested Range Not Satisfiable", just proceed and
pretend this is no error */
/* "Requested Range Not Satisfiable", proceed and pretend this is no
error */
k->ignorebody = TRUE; /* Avoid appending error msg to good data. */
}

View file

@ -39,8 +39,8 @@ typedef enum {
/* When redirecting transfers. */
typedef enum {
FOLLOW_NONE, /* not used within the function, just a placeholder to
allow initing to this */
FOLLOW_NONE, /* not used within the function, a placeholder to allow
initing to this */
FOLLOW_FAKE, /* only records stuff, not actually following */
FOLLOW_RETRY, /* set if this is a request retry as opposed to a real
redirect following */

View file

@ -63,7 +63,7 @@
#define H2_CONN_WINDOW_SIZE (10 * 1024 * 1024)
/* on receiving from TLS, we prep for holding a full stream window */
#define H2_NW_RECV_CHUNKS (H2_CONN_WINDOW_SIZE / H2_CHUNK_SIZE)
/* on send into TLS, we just want to accumulate small frames */
/* on send into TLS, we want to accumulate small frames */
#define H2_NW_SEND_CHUNKS 1
/* this is how much we want "in flight" for a stream, unthrottled */
#define H2_STREAM_WINDOW_SIZE_MAX (10 * 1024 * 1024)
@ -525,8 +525,8 @@ static CURLcode h2_process_pending_input(struct Curl_cfilter *cf,
}
/*
* The server may send us data at any point (e.g. PING frames). Therefore,
* we cannot assume that an HTTP/2 socket is dead just because it is readable.
* The server may send us data at any point (e.g. PING frames). Therefore, we
* cannot assume that an HTTP/2 socket is dead because it is readable.
*
* Check the lower filters first and, if successful, peek at the socket
* and distinguish between closed and data.
@ -677,7 +677,7 @@ char *curl_pushheader_byname(struct curl_pushheaders *h, const char *name)
size_t i;
/* Verify that we got a good easy handle in the push header struct,
mostly to detect rubbish input fast(er). Also empty header name
is just a rubbish too. We have to allow ":" at the beginning of
is rubbish too. We have to allow ":" at the beginning of
the header, but header == ":" must be rejected. If we have ':' in
the middle of header, it could be matched in middle of the value,
this is because we do prefix match.*/

View file

@ -1322,12 +1322,12 @@ static CURLcode imap_state_listsearch_resp(struct Curl_easy *data,
imap_state(data, imapc, IMAP_STOP);
}
else {
/* Failed to parse literal, just write the line */
/* Failed to parse literal, write the line */
result = Curl_client_write(data, CLIENTWRITE_BODY, line, len);
}
}
else {
/* No literal, just write the line as-is */
/* No literal, write the line as-is */
result = Curl_client_write(data, CLIENTWRITE_BODY, line, len);
}
}
@ -1455,7 +1455,7 @@ static CURLcode imap_state_fetch_resp(struct Curl_easy *data,
infof(data, "Written %zu bytes, %" FMT_OFF_TU
" bytes are left for transfer", chunk, size - chunk);
/* Have we used the entire overflow or just part of it?*/
/* Have we used the entire overflow or part of it?*/
if(pp->overflow > chunk) {
/* remember the remaining trailing overflow data */
pp->overflow -= chunk;

View file

@ -210,9 +210,8 @@ typedef struct md4_ctx MD4_CTX;
* SET reads 4 input bytes in little-endian byte order and stores them
* in a properly aligned word in host byte order.
*
* The check for little-endian architectures that tolerate unaligned
* memory accesses is just an optimization. Nothing will break if it
* does not work.
* The check for little-endian architectures that tolerate unaligned memory
* accesses is an optimization. Nothing will break if it does not work.
*/
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define MD4_SET(n) (*(const uint32_t *)(const void *)&ptr[(n) * 4])

View file

@ -270,7 +270,7 @@ typedef struct md5_ctx my_md5_ctx;
* The basic MD5 functions.
*
* F and G are optimized compared to their RFC 1321 definitions for
* architectures that lack an AND-NOT instruction, just like in Colin Plumb's
* architectures that lack an AND-NOT instruction, like in Colin Plumb's
* implementation.
*/
#define MD5_F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
@ -291,9 +291,8 @@ typedef struct md5_ctx my_md5_ctx;
* SET reads 4 input bytes in little-endian byte order and stores them
* in a properly aligned word in host byte order.
*
* The check for little-endian architectures that tolerate unaligned
* memory accesses is just an optimization. Nothing will break if it
* does not work.
* The check for little-endian architectures that tolerate unaligned memory
* accesses is an optimization. Nothing will break if it does not work.
*/
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define MD5_SET(n) (*(const uint32_t *)(const void *)&ptr[(n) * 4])

View file

@ -310,7 +310,7 @@ static curl_off_t encoder_nop_size(curl_mimepart *part)
return part->datasize;
}
/* 7-bit encoder: the encoder is just a data validity check. */
/* 7-bit encoder: the encoder is a data validity check. */
static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
curl_mimepart *part)
{

View file

@ -224,7 +224,7 @@ static int parsefmt(const char *format,
/* illegal combo */
return PFMT_DOLLAR;
/* we got no positional, just get the next arg */
/* we got no positional, get the next arg */
param = -1;
use_dollar = DOLLAR_NOPE;
}
@ -938,7 +938,7 @@ static bool out_pointer(void *userp,
* All output is sent to the 'stream()' callback, one byte at a time.
*/
static int formatf(void *userp, /* untouched by format(), just sent to the
static int formatf(void *userp, /* untouched by format(), sent to the
stream() function in the second argument */
/* function pointer called for each output character */
int (*stream)(unsigned char, void *),
@ -972,7 +972,7 @@ static int formatf(void *userp, /* untouched by format(), just sent to the
done++;
}
if(optr->flags & FLAGS_SUBSTR)
/* this is just a substring */
/* this is a substring */
continue;
}

View file

@ -374,7 +374,7 @@ static CURLMcode multi_xfers_add(struct Curl_multi *multi,
if(capacity < max_capacity) {
/* We want `multi->xfers` to have "sufficient" free rows, so that we do
* have to reuse the `mid` from a just removed easy right away.
* have to reuse the `mid` from a removed easy right away.
* Since uint_tbl and uint_bset are quite memory efficient,
* regard less than 25% free as insufficient.
* (for low capacities, e.g. multi_easy, 4 or less). */
@ -627,7 +627,7 @@ static void multi_done_locked(struct connectdata *conn,
return;
}
data->state.done = TRUE; /* called just now! */
data->state.done = TRUE; /* called now! */
data->state.recent_conn_id = conn->connection_id;
Curl_resolv_unlink(data, &data->state.dns[0]); /* done with this */
@ -1461,7 +1461,7 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
#endif
int pollrc;
#ifdef USE_WINSOCK
if(cpfds.n) /* just pre-check with Winsock */
if(cpfds.n) /* pre-check with Winsock */
pollrc = Curl_poll(cpfds.pfds, cpfds.n, 0);
else
pollrc = 0;
@ -2015,7 +2015,7 @@ static CURLMcode state_performing(struct Curl_easy *data,
if(data->req.newurl || retry) {
followtype follow = FOLLOW_NONE;
if(!retry) {
/* if the URL is a follow-location and not just a retried request then
/* if the URL is a follow-location and not a retried request then
figure out the URL here */
curlx_free(newurl);
newurl = data->req.newurl;
@ -2985,7 +2985,7 @@ void Curl_multi_will_close(struct Curl_easy *data, curl_socket_t s)
* add_next_timeout()
*
* Each Curl_easy has a list of timeouts. The add_next_timeout() is called
* when it has just been removed from the splay tree because the timeout has
* when it has been removed from the splay tree because the timeout has
* expired. This function is then to advance in the list to pick the next
* timeout to use (skip the already expired ones) and add this node back to
* the splay tree again.
@ -3551,7 +3551,7 @@ void Curl_expire_ex(struct Curl_easy *data,
set.tv_usec -= 1000000;
}
/* Remove any timer with the same id just in case. */
/* Remove any timer with the same id */
multi_deltimeout(data, id);
/* Add it to the timer list. It must stay in the list until it has expired

View file

@ -568,9 +568,9 @@ void Curl_multi_ev_dirty_xfers(struct Curl_multi *multi,
/* Unmatched socket, we cannot act on it but we ignore this fact. In
real-world tests it has been proved that libevent can in fact give
the application actions even though the socket was just previously
the application actions even though the socket was previously
asked to get removed, so thus we better survive stray socket actions
and just move on. */
and move on. */
if(entry) {
struct Curl_easy *data;
uint32_t mid;

View file

@ -201,7 +201,7 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
if(!strcmp("*", no_proxy))
return TRUE;
/* NO_PROXY was specified and it was not just an asterisk */
/* NO_PROXY was specified and it was not only an asterisk */
/* Check if name is an IP address; if not, assume it being a hostname. */
namelen = strlen(name);
@ -251,7 +251,7 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
while(*p == ',')
p++;
} /* while(*p) */
} /* NO_PROXY was specified and it was not just an asterisk */
} /* NO_PROXY was specified and it was not only an asterisk */
return FALSE;
}

View file

@ -387,7 +387,7 @@ static int parsedate(const char *date, time_t *output)
}
if(!found && (tzoff == -1)) {
/* this just must be a time zone string */
/* this must be a time zone string */
tzoff = checktz(date, len);
if(tzoff != -1)
found = TRUE;

View file

@ -94,7 +94,7 @@ CURLcode Curl_pp_statemach(struct Curl_easy *data,
if(Curl_conn_data_pending(data, FIRSTSOCKET))
rc = 1;
else if(pp->overflow)
/* We are receiving and there is data in the cache so just read it */
/* We are receiving and there is data in the cache so read it */
rc = 1;
else if(!pp->sendleft && Curl_conn_data_pending(data, FIRSTSOCKET))
/* We are receiving and there is data ready in the SSL library */

View file

@ -105,7 +105,7 @@ static void rlimit_tune_steps(struct Curl_rlimit *r,
/* Calculate tokens for the last step and the ones before. */
tokens_last = tokens_total / 100;
if(!tokens_last) /* less than 100 total, just use 1 */
if(!tokens_last) /* less than 100 total, use 1 */
tokens_last = 1;
else if(tokens_last > CURL_RLIMIT_MIN_RATE)
tokens_last = CURL_RLIMIT_MIN_RATE;

View file

@ -32,7 +32,7 @@
struct UserDefined;
enum expect100 {
EXP100_SEND_DATA, /* enough waiting, just send the body now */
EXP100_SEND_DATA, /* enough waiting, send the body now */
EXP100_AWAITING_CONTINUE, /* waiting for the 100 Continue header */
EXP100_SENDING_REQUEST, /* still sending the request but will wait for
the 100 header once done with the request */

View file

@ -926,7 +926,7 @@ static CURLcode rtsp_rtp_write_resp(struct Curl_easy *data,
out:
if((data->set.rtspreq == RTSPREQ_RECEIVE) &&
(rtspc->state == RTP_PARSE_SKIP)) {
/* In special mode RECEIVE, we just process one chunk of network
/* In special mode RECEIVE, we process one chunk of network
* data, so we stop the transfer here, if we have no incomplete
* RTP message pending. */
data->req.download_done = TRUE;

View file

@ -66,7 +66,7 @@ static int our_select(curl_socket_t maxfd, /* highest socket number */
if((!fds_read || fds_read->fd_count == 0) &&
(!fds_write || fds_write->fd_count == 0) &&
(!fds_err || fds_err->fd_count == 0)) {
/* no sockets, just wait */
/* no sockets, wait */
return curlx_wait_ms(timeout_ms);
}
#endif
@ -82,9 +82,9 @@ static int our_select(curl_socket_t maxfd, /* highest socket number */
given as null. At least one must be non-null, and any non-null
descriptor set must contain at least one handle to a socket.
It is unclear why Winsock does not just handle this for us instead of
It is unclear why Winsock does not handle this for us instead of
calling this an error. Luckily, with Winsock, we can _also_ ask how
many bits are set on an fd_set. So, let's just check it beforehand.
many bits are set on an fd_set. So, let's check it beforehand.
*/
return select((int)maxfd + 1,
fds_read && fds_read->fd_count ? fds_read : NULL,
@ -128,7 +128,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
(writefd == CURL_SOCKET_BAD)) {
/* no sockets, just wait */
/* no sockets, wait */
return curlx_wait_ms(timeout_ms);
}
@ -223,7 +223,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
}
}
if(fds_none) {
/* no sockets, just wait */
/* no sockets, wait */
return curlx_wait_ms(timeout_ms);
}

View file

@ -697,7 +697,7 @@ static CURLcode cr_in_read(struct Curl_easy *data,
case CURL_READFUNC_PAUSE:
if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
/* protocols that work without network cannot be paused. This is
actually only FILE:// just now, and it cannot pause since the transfer
actually only FILE:// now, and it cannot pause since the transfer
is not done using the "normal" procedure. */
failf(data, "Read callback asked for PAUSE when not supported");
result = CURLE_READ_ERROR;

View file

@ -359,8 +359,8 @@ CURLcode Curl_setopt_SSLVERSION(struct Curl_easy *data, CURLoption option,
static CURLcode setopt_RTSP_REQUEST(struct Curl_easy *data, long arg)
{
/*
* Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...)
* Would this be better if the RTSPREQ_* were just moved into here?
* Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) Would this be
* better if the RTSPREQ_* were moved into here?
*/
Curl_RtspReq rtspreq = RTSPREQ_NONE;
switch(arg) {
@ -1374,7 +1374,7 @@ static CURLcode setopt_slist(struct Curl_easy *data, CURLoption option,
* Entries added this way will remain in the cache until explicitly
* removed or the handle is cleaned up.
*
* Prefix the HOST with plus sign (+) to have the entry expire just like
* Prefix the HOST with plus sign (+) to have the entry expire like
* automatically added entries.
*
* Prefix the HOST with dash (-) to _remove_ the entry from the cache.
@ -2050,10 +2050,9 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
*/
return Curl_setstropt(&s->str[STRING_CUSTOMREQUEST], ptr);
/* we do not set
s->method = HTTPREQ_CUSTOM;
here, we continue as if we were using the already set type
and this just changes the actual request keyword */
/* we do not set s->method = HTTPREQ_CUSTOM; here, we continue as if we
were using the already set type and this changes the actual request
keyword */
case CURLOPT_SERVICE_NAME:
/*
* Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO

View file

@ -86,7 +86,7 @@ static char *vms_translate_path(const char *path)
char *test_str;
/* See if the result is in VMS format, if not, we are done */
/* Assume that this is a PATH, not just some data */
/* Assume that this is a PATH, not some data */
test_str = strpbrk(path, ":[<^");
if(!test_str) {
return (char *)path;
@ -165,7 +165,7 @@ static struct passwd *vms_getpwuid(uid_t uid)
return my_passwd;
}
/* If no changes needed just return it */
/* If no changes needed, return it */
if(unix_path == my_passwd->pw_dir) {
return my_passwd;
}

View file

@ -64,12 +64,12 @@
#endif
/*
* Include header files for Windows builds before redefining anything.
* Use this preprocessor block only to include or exclude windows.h,
* winsock2.h or ws2tcpip.h. Any other Windows thing belongs
* to any other further and independent block. Under Cygwin things work
* just as under Linux (e.g. <sys/socket.h>) and the Winsock headers should
* never be included when __CYGWIN__ is defined.
* Include header files for Windows builds before redefining anything. Use
* this preprocessor block only to include or exclude windows.h, winsock2.h or
* ws2tcpip.h. Any other Windows thing belongs to any other further and
* independent block. Under Cygwin things work as under Linux (e.g.
* <sys/socket.h>) and the Winsock headers should never be included when
* __CYGWIN__ is defined.
*/
#ifdef _WIN32
# if defined(UNICODE) && !defined(_UNICODE)

View file

@ -315,7 +315,7 @@ static CURLcode cr_eob_init(struct Curl_easy *data,
struct cr_eob_ctx *ctx = reader->ctx;
(void)data;
/* The first char we read is the first on a line, as if we had
* read CRLF just before */
* read CRLF before */
ctx->n_eob = 2;
Curl_bufq_init2(&ctx->buf, (16 * 1024), 1, BUFQ_OPT_SOFT_LIMIT);
return CURLE_OK;
@ -354,7 +354,7 @@ static CURLcode cr_eob_read(struct Curl_easy *data,
ctx->read_eos = eos;
if(nread) {
if(!ctx->n_eob && !memchr(buf, SMTP_EOB[0], nread)) {
/* not in the middle of a match, no EOB start found, just pass */
/* not in the middle of a match, no EOB start found, pass */
*pnread = nread;
*peos = FALSE;
return CURLE_OK;
@ -403,7 +403,7 @@ static CURLcode cr_eob_read(struct Curl_easy *data,
CURL_TRC_SMTP(data, "auto-ending mail body with '\\r\\n.\\r\\n'");
switch(ctx->n_eob) {
case 2:
/* seen a CRLF at the end, just add the remainder */
/* seen a CRLF at the end, add the remainder */
eob = &SMTP_EOB[2];
break;
case 3:

View file

@ -241,7 +241,7 @@ int Curl_splayremove(struct Curl_tree *t,
to remove, as otherwise we might be trying to remove a node that
is not actually in the tree.
We cannot just compare the keys here as a double remove in quick
We cannot compare the keys here as a double remove in quick
succession of a node with key != SPLAY_SUBNODE && same != NULL
could return the same key but a different node. */
DEBUGASSERT(t == removenode);
@ -252,7 +252,7 @@ int Curl_splayremove(struct Curl_tree *t,
remove the root node of a list of nodes with identical keys. */
x = t->samen;
if(x != t) {
/* 'x' is the new root node, we just make it use the root node's
/* 'x' is the new root node, we make it use the root node's
smaller/larger links */
x->key = t->key;

View file

@ -42,7 +42,7 @@ static int casecompare(const char *first, const char *second)
second++;
}
/* If we are here either the strings are the same or the length is different.
We can just test if the "current" character is non-zero for one and zero
We can test if the "current" character is non-zero for one and zero
for the other. Note that the characters may not be exactly the same even
if they match, we only want to compare zero-ness. */
return !*first == !*second;

View file

@ -32,7 +32,7 @@
CURLcode Curl_win32_init(long flags)
{
/* CURL_GLOBAL_WIN32 controls the *optional* part of the initialization which
is just for Winsock at the moment. Any required Win32 initialization
is for Winsock at the moment. Any required Win32 initialization
should take place after this block. */
if(flags & CURL_GLOBAL_WIN32) {
#ifdef USE_WINSOCK

View file

@ -211,8 +211,8 @@ static CURLcode init_telnet(struct Curl_easy *data)
*/
tn->him_preferred[CURL_TELOPT_ECHO] = CURL_YES;
/* Set the subnegotiation fields to send information
just after negotiation passed (do/will)
/* Set the subnegotiation fields to send information after negotiation
passed (do/will)
Default values are (0,0) initialized by calloc.
According to the RFC1013 it is valid:
@ -961,7 +961,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
/* if the option contains an IAC code, it should be escaped in the output, but
as we cannot think of any legit way to send that as part of the content we
rather just ban its use instead */
rather ban its use instead */
static bool bad_option(const char *data)
{
return !data || !!strchr(data, CURL_IAC);
@ -1293,7 +1293,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
/* If stdin_handle is a pipe, use PeekNamedPipe() method to check it,
else use the old WaitForMultipleObjects() way */
if(GetFileType(stdin_handle) == FILE_TYPE_PIPE || data->set.is_fread_set) {
/* Do not wait for stdin_handle, just wait for event_handle */
/* Do not wait for stdin_handle, wait for event_handle */
obj_count = 1;
/* Check stdin_handle per 100 milliseconds */
wait_timeout = 100;

View file

@ -536,7 +536,7 @@ static CURLcode tftp_rx(struct tftp_conn *state, tftp_event_t event)
infof(data, "Received last DATA packet block %d again.", rblock);
}
else {
/* totally unexpected, just log it */
/* totally unexpected, log it */
infof(data,
"Received unexpected DATA packet block %d, expecting block %d",
rblock, NEXT_BLOCKNUM(state->block));

View file

@ -254,10 +254,10 @@ static CURLcode sendrecv_dl(struct Curl_easy *data,
#if 0
DEBUGF(infof(data, "dl_rlimit, available=%" FMT_OFF_T, dl_avail));
#endif
/* In case of rate limited downloads: if this loop already got
* data and less than 16k is left in the limit, break out.
* We want to stutter a bit to keep in the limit, but too small
* receives will just cost cpu unnecessarily. */
/* In case of rate limited downloads: if this loop already got data and
* less than 16k is left in the limit, break out. We want to stutter a
* bit to keep in the limit, but too small receives will cost cpu
* unnecessarily. */
if(dl_avail <= 0) {
rate_limited = TRUE;
break;
@ -406,7 +406,7 @@ CURLcode Curl_sendrecv(struct Curl_easy *data)
}
else {
/*
* The transfer has been performed. Just make some general checks before
* The transfer has been performed. Make some general checks before
* returning.
*/
if(!(data->req.no_body) && (k->size != -1) &&
@ -666,11 +666,10 @@ CURLcode Curl_retry_request(struct Curl_easy *data, char **url)
return CURLE_OUT_OF_MEMORY;
connclose(conn, "retry"); /* close this connection */
conn->bits.retry = TRUE; /* mark this as a connection we are about
to retry. Marking it this way should
prevent i.e HTTP transfers to return
error just because nothing has been
transferred! */
conn->bits.retry = TRUE; /* mark this as a connection we are about to
retry. Marking it this way should prevent i.e
HTTP transfers to return error because nothing
has been transferred! */
Curl_creader_set_rewind(data, TRUE);
}
return CURLE_OK;
@ -704,9 +703,9 @@ static void xfer_setup(
k->shutdown = FALSE;
k->shutdown_err_ignore = FALSE;
/* The code sequence below is placed in this function just because all
necessary input is not always known in do_complete() as this function may
be called after that */
/* The code sequence below is placed in this function because all necessary
input is not always known in do_complete() as this function may be called
after that */
if(!k->header && (recv_size > 0))
Curl_pgrsSetDownloadSize(data, recv_size);

View file

@ -125,9 +125,9 @@ static void data_priority_cleanup(struct Curl_easy *data);
#define data_priority_cleanup(x)
#endif
/* Some parts of the code (e.g. chunked encoding) assume this buffer has at
* more than just a few bytes to play with. Do not let it become too small or
* bad things will happen.
/* Some parts of the code (e.g. chunked encoding) assume this buffer has more
* than a few bytes to play with. Do not let it become too small or bad things
* will happen.
*/
#if READBUFFER_SIZE < READBUFFER_MIN
# error READBUFFER_SIZE is too small
@ -254,7 +254,7 @@ CURLcode Curl_close(struct Curl_easy **datap)
* handle might check the magic and so might any
* DEBUGFUNCTION invoked for tracing */
/* freed here just in case DONE was not called */
/* freed here in case DONE was not called */
Curl_req_free(&data->req, data);
/* Close down all open SSL info and sessions */
@ -617,7 +617,7 @@ static bool socks_proxy_info_matches(const struct proxy_info *data,
#endif
/* A connection has to have been idle for less than 'conn_max_idle_ms'
(the success rate is just too low after this), or created less than
(the success rate is too low after this), or created less than
'conn_max_age_ms' ago, to be subject for reuse. */
static bool conn_maxage(struct Curl_easy *data,
struct connectdata *conn,
@ -1411,7 +1411,7 @@ static struct connectdata *allocate_conn(struct Curl_easy *data)
conn->http_proxy.proxytype = data->set.proxytype;
conn->socks_proxy.proxytype = CURLPROXY_SOCKS4;
/* note that these two proxy bits are now just on what looks to be
/* note that these two proxy bits are set on what looks to be
requested, they may be altered down the road */
conn->bits.proxy = (data->set.str[STRING_PROXY] &&
*data->set.str[STRING_PROXY]);
@ -3071,9 +3071,9 @@ static CURLcode resolve_unix(struct Curl_easy *data,
DEBUGASSERT(unix_path);
*pdns = NULL;
/* Unix domain sockets are local. The host gets ignored, just use the
* specified domain socket address. Do not cache "DNS entries". There is
* no DNS involved and we already have the file system path available. */
/* Unix domain sockets are local. The host gets ignored, use the specified
* domain socket address. Do not cache "DNS entries". There is no DNS
* involved and we already have the file system path available. */
hostaddr = curlx_calloc(1, sizeof(struct Curl_dns_entry));
if(!hostaddr)
return CURLE_OUT_OF_MEMORY;

View file

@ -361,8 +361,8 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
size_t keep = portptr - hostname;
/* Browser behavior adaptation. If there is a colon with no digits after,
just cut off the name there which makes us ignore the colon and just
use the default port. Firefox, Chrome and Safari all do that.
cut off the name there which makes us ignore the colon and use the
default port. Firefox, Chrome and Safari all do that.
Do not do it if the URL has no scheme, to make something that looks like
a scheme not work!
@ -1078,7 +1078,7 @@ static CURLUcode handle_path(CURLU *u, const char *path,
}
if(pathlen <= 1) {
/* there is no path left or just the slash, unset */
/* there is no path left or the slash, unset */
path = NULL;
}
else {
@ -1089,7 +1089,7 @@ static CURLUcode handle_path(CURLU *u, const char *path,
path = u->path;
}
else if(flags & CURLU_URLENCODE)
/* it might have encoded more than just the path so cut it */
/* it might have encoded more than the path so cut it */
u->path[pathlen] = 0;
if(!(flags & CURLU_PATH_AS_IS)) {

View file

@ -671,7 +671,7 @@ struct connectdata {
* for concurrency reasons. That multi might run in another thread.
* `attached_multi` is set by the first transfer attached and cleared
* when the last one is detached.
* NEVER call anything on this multi, just check for equality. */
* NEVER call anything on this multi, check for equality. */
struct Curl_multi *attached_multi;
/*************** Request - specific items ************/
@ -1268,7 +1268,7 @@ enum dupstring {
STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */
STRING_LAST /* not used, just an end-of-list marker */
STRING_LAST /* not used, an end-of-list marker */
};
enum dupblob {

View file

@ -784,7 +784,7 @@ static void cb_rand(uint8_t *dest, size_t destlen,
result = Curl_rand(NULL, dest, destlen);
if(result) {
/* cb_rand is only used for non-cryptographic context. If Curl_rand
failed, just fill 0 and call it *random*. */
failed, fill 0 and call it *random*. */
memset(dest, 0, destlen);
}
}
@ -2048,8 +2048,8 @@ static CURLcode cf_progress_egress(struct Curl_cfilter *cf,
}
else if(nread > gsolen ||
(gsolen > path_max_payload_size && nread != gsolen)) {
/* The just added packet is a PMTUD *or* the one(s) before the
* just added were PMTUD and the last one is smaller.
/* The added packet is a PMTUD *or* the one(s) before the
* added were PMTUD and the last one is smaller.
* Flush the buffer before the last add. */
curlcode = vquic_send_tail_split(cf, data, &ctx->q,
gsolen, nread, nread);

View file

@ -60,7 +60,7 @@
#define H3_STREAM_WINDOW_SIZE (1024 * 128)
#define H3_STREAM_CHUNK_SIZE (1024 * 16)
/* Receive and Send max number of chunks just follows from the
/* Receive and Send max number of chunks follows from the
* chunk size and window size */
#define H3_STREAM_RECV_CHUNKS \
(H3_STREAM_WINDOW_SIZE / H3_STREAM_CHUNK_SIZE)
@ -126,7 +126,7 @@ static void cf_quiche_ctx_init(struct cf_quiche_ctx *ctx)
static void cf_quiche_ctx_free(struct cf_quiche_ctx *ctx)
{
if(ctx && ctx->initialized) {
/* quiche just freed it */
/* quiche freed it */
ctx->tls.ossl.ssl = NULL;
Curl_vquic_tls_cleanup(&ctx->tls);
Curl_ssl_peer_cleanup(&ctx->peer);
@ -1124,7 +1124,7 @@ static CURLcode cf_quiche_send(struct Curl_cfilter *cf, struct Curl_easy *data,
* server. If the server has send us a final response, we should
* silently discard the send data.
* This happens for example on redirects where the server, instead
* of reading the full request body just closed the stream after
* of reading the full request body closed the stream after
* sending the 30x response.
* This is sort of a race: had the transfer loop called recv first,
* it would see the response and stop/discard sending on its own- */

View file

@ -53,7 +53,7 @@ struct curl_tls_ctx {
* Callback passed to `Curl_vquic_tls_init()` that can
* do early initializations on the not otherwise configured TLS
* instances created. This varies by TLS backend:
* - openssl/wolfssl: SSL_CTX* has just been created
* - openssl/wolfssl: SSL_CTX* has been created
* - gnutls: gtls_client_init() has run
*/
typedef CURLcode Curl_vquic_tls_ctx_setup(struct Curl_cfilter *cf,

View file

@ -170,7 +170,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
#endif
return CURLE_AGAIN;
case SOCKEMSGSIZE:
/* UDP datagram is too large; caused by PMTUD. Just let it be lost. */
/* UDP datagram is too large; caused by PMTUD. Let it be lost. */
*psent = pktlen;
break;
case EIO:
@ -214,7 +214,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
result = CURLE_SEND_ERROR;
goto out;
}
/* UDP datagram is too large; caused by PMTUD. Just let it be lost. */
/* UDP datagram is too large; caused by PMTUD. Let it be lost. */
*psent = pktlen;
}
}

View file

@ -1129,7 +1129,7 @@ static int myssh_in_SFTP_DOWNLOAD_STAT(struct Curl_easy *data,
(attrs->size == 0)) {
/*
* sftp_fstat did not return an error, so maybe the server
* just does not support stat()
* does not support stat()
* OR the server does not return a file size with a stat()
* OR file size is 0
*/

View file

@ -1289,7 +1289,7 @@ static CURLcode sftp_download_stat(struct Curl_easy *data,
(attrs.filesize == 0)) {
/*
* libssh2_sftp_open() did not return an error, so maybe the server
* just does not support stat()
* does not support stat()
* OR the server does not return a file size with a stat()
* OR file size is 0
*/

View file

@ -493,7 +493,7 @@ static CURLcode mbed_load_cacert(struct Curl_cfilter *cf,
if(ca_info_blob && verifypeer) {
#ifdef MBEDTLS_PEM_PARSE_C
/* if DER or a null-terminated PEM just process using
/* if DER or a null-terminated PEM process using
mbedtls_x509_crt_parse(). */
if((ssl_cert_type && curl_strequal(ssl_cert_type, "DER")) ||
((char *)(ca_info_blob->data))[ca_info_blob->len - 1] == '\0') {
@ -605,7 +605,7 @@ static CURLcode mbed_load_clicert(struct Curl_cfilter *cf,
if(ssl_cert_blob) {
#ifdef MBEDTLS_PEM_PARSE_C
/* if DER or a null-terminated PEM just process using
/* if DER or a null-terminated PEM process using
mbedtls_x509_crt_parse(). */
if((ssl_cert_type && curl_strequal(ssl_cert_type, "DER")) ||
((char *)(ssl_cert_blob->data))[ssl_cert_blob->len - 1] == '\0') {

View file

@ -1955,7 +1955,7 @@ static CURLcode ossl_shutdown(struct Curl_cfilter *cf,
CURL_TRC_CF(data, cf, "SSL shutdown not received, but closed");
*done = TRUE;
break;
case SSL_ERROR_NONE: /* just did not get anything */
case SSL_ERROR_NONE: /* did not get anything */
case SSL_ERROR_WANT_READ:
/* SSL has send its notify and now wants to read the reply
* from the server. We are not really interested in that. */
@ -2791,7 +2791,7 @@ static CURLcode load_cacert_from_memory(X509_STORE *store,
BIO *cbio = NULL;
STACK_OF(X509_INFO) *inf = NULL;
/* everything else is just a reference */
/* everything else is a reference */
int i, count = 0;
X509_INFO *itmp = NULL;
@ -3400,7 +3400,7 @@ ossl_init_session_and_alpns(struct ossl_ctx *octx,
SSL_SESSION *ssl_session = NULL;
/* If OpenSSL does not accept the session from the cache, this
* is not an error. We just continue without it. */
* is not an error. We continue without it. */
ssl_session = d2i_SSL_SESSION(NULL, &der_sessionid,
(long)der_sessionid_size);
if(ssl_session) {
@ -3778,8 +3778,8 @@ CURLcode Curl_ossl_ctx_init(struct ossl_ctx *octx,
The enabled extension concerns the session management. I wonder how often
libcurl stops a connection and then resumes a TLS session. Also, sending
the session data is some overhead. I suggest that you just use your
proposed patch (which explicitly disables TICKET).
the session data is some overhead. I suggest that you use your proposed
patch (which explicitly disables TICKET).
If someone writes an application with libcurl and OpenSSL who wants to
enable the feature, one can do this in the SSL callback.

View file

@ -2284,7 +2284,7 @@ static CURLcode schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
backend->recv_sspi_close_notify = TRUE;
if(!backend->recv_connection_closed)
backend->recv_connection_closed = TRUE;
/* We received the close notify just fine, any error we got
/* We received the close notify fine, any error we got
* from the lower filters afterwards (e.g. the socket), is not
* an error on the TLS data stream. That one ended here. */
if(result == CURLE_RECV_ERROR)

View file

@ -249,7 +249,7 @@ extern struct Curl_cftype Curl_cft_ssl_proxy;
#else /* if not USE_SSL */
/* When SSL support is not present, just define away these function calls */
/* When SSL support is not present, define away these function calls */
#define Curl_ssl_init() 1
#define Curl_ssl_cleanup() Curl_nop_stmt
#define Curl_ssl_close_all(x) Curl_nop_stmt

View file

@ -58,7 +58,7 @@ struct Curl_ssl_scache_peer {
unsigned char key_salt[CURL_SHA256_DIGEST_LENGTH]; /* for entry export */
unsigned char key_hmac[CURL_SHA256_DIGEST_LENGTH]; /* for entry export */
size_t max_sessions;
long age; /* just a number, the higher the more recent */
long age; /* a number, the higher the more recent */
BIT(hmac_set); /* if key_salt and key_hmac are present */
BIT(exportable); /* sessions for this peer can be exported */
};
@ -288,7 +288,7 @@ CURLcode Curl_ssl_peer_key_make(struct Curl_cfilter *cf,
goto out;
*ppeer_key = curlx_dyn_take(&buf, &key_len);
/* we just added printable char, and dynbuf always null-terminates, no need
/* we added printable char, and dynbuf always null-terminates, no need
* to track length */
out:

View file

@ -658,7 +658,7 @@ static CURLcode wssl_populate_x509_store(struct Curl_cfilter *cf,
return CURLE_SSL_CACERT_BADFILE;
}
else {
/* Just continue with a warning if no strict certificate
/* continue with a warning if no strict certificate
verification is required. */
infof(data, "error setting certificate verify locations,"
" continuing anyway:");
@ -1612,7 +1612,7 @@ static CURLcode wssl_send_earlydata(struct Curl_cfilter *cf,
int err = wolfSSL_get_error(wssl->ssl, rc);
char error_buffer[256];
switch(err) {
case WOLFSSL_ERROR_NONE: /* just did not get anything */
case WOLFSSL_ERROR_NONE: /* did not get anything */
case WOLFSSL_ERROR_WANT_READ:
case WOLFSSL_ERROR_WANT_WRITE:
return CURLE_AGAIN;
@ -1741,7 +1741,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf, struct Curl_easy *data)
failf(data, " CA signer not available for verification");
return CURLE_SSL_CACERT_BADFILE;
}
/* Just continue with a warning if no strict certificate
/* Continue with a warning if no strict certificate
verification is required. */
infof(data, "CA signer not available for verification, "
"continuing anyway");
@ -1941,7 +1941,7 @@ static CURLcode wssl_shutdown(struct Curl_cfilter *cf,
CURL_TRC_CF(data, cf, "SSL shutdown received");
*done = TRUE;
break;
case WOLFSSL_ERROR_NONE: /* just did not get anything */
case WOLFSSL_ERROR_NONE: /* did not get anything */
case WOLFSSL_ERROR_WANT_READ:
/* wolfSSL has send its notify and now wants to read the reply
* from the server. We are not really interested in that. */

View file

@ -369,7 +369,7 @@ static CURLcode utf8asn1str(struct dynbuf *to, int type, const char *from,
return CURLE_BAD_FUNCTION_ARGUMENT;
if(type == CURL_ASN1_UTF8_STRING) {
/* Just copy. */
/* copy. */
if(inlength)
result = curlx_dyn_addn(to, from, inlength);
}