code: language cleanup in comments

Based on the standards and guidelines we use for our documentation.

 - expand contractions (they're => they are etc)
 - host name = > hostname
 - file name => filename
 - user name = username
 - man page => manpage
 - run-time => runtime
 - set-up => setup
 - back-end => backend
 - a HTTP => an HTTP
 - Two spaces after a period => one space after period

Closes #14073
This commit is contained in:
Daniel Stenberg 2024-07-01 16:47:21 +02:00
parent 9b683577e1
commit c074ba64a8
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
213 changed files with 1719 additions and 1715 deletions

View file

@ -53,7 +53,7 @@
#endif
#ifndef HAVE_SOCKET
#error "We can't compile without socket() support!"
#error "We cannot compile without socket() support!"
#endif
#include "urldata.h"
@ -237,7 +237,7 @@ static ssize_t Curl_xfer_recv_resp(struct Curl_easy *data,
return -1;
}
}
DEBUGF(infof(data, "readwrite_data: we're done"));
DEBUGF(infof(data, "readwrite_data: we are done"));
}
DEBUGASSERT(nread >= 0);
return nread;
@ -348,8 +348,8 @@ static CURLcode readwrite_data(struct Curl_easy *data,
if(((k->keepon & (KEEP_RECV|KEEP_SEND)) == KEEP_SEND) &&
(conn->bits.close || is_multiplex)) {
/* When we've read the entire thing and the close bit is set, the server
may now close the connection. If there's now any kind of sending going
/* When we have read the entire thing and the close bit is set, the server
may now close the connection. If there is now any kind of sending going
on from our side, we need to stop that immediately. */
infof(data, "we are done reading and this is set to close, stop send");
k->keepon &= ~KEEP_SEND; /* no writing anymore either */
@ -528,9 +528,9 @@ CURLcode Curl_readwrite(struct Curl_easy *data)
if(!(data->req.no_body) && (k->size != -1) &&
(k->bytecount != k->size) &&
#ifdef CURL_DO_LINEEND_CONV
/* Most FTP servers don't adjust their file SIZE response for CRLFs,
so we'll check to see if the discrepancy can be explained
by the number of CRLFs we've changed to LFs.
/* Most FTP servers do not adjust their file SIZE response for CRLFs,
so we will check to see if the discrepancy can be explained
by the number of CRLFs we have changed to LFs.
*/
(k->bytecount != (k->size + data->state.crlf_conversions)) &&
#endif /* CURL_DO_LINEEND_CONV */
@ -575,7 +575,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
CURLcode result;
if(!data->state.url && !data->set.uh) {
/* we can't do anything without URL */
/* we cannot do anything without URL */
failf(data, "No URL set");
return CURLE_URL_MALFORMAT;
}
@ -599,7 +599,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
}
if(data->set.postfields && data->set.set_resume_from) {
/* we can't */
/* we cannot */
failf(data, "cannot mix POSTFIELDS with RESUME_FROM");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
@ -701,7 +701,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
/*
* Set user-agent. Used for HTTP, but since we can attempt to tunnel
* basically anything through an HTTP proxy we can't limit this based on
* basically anything through an HTTP proxy we cannot limit this based on
* protocol.
*/
if(data->set.str[STRING_USERAGENT]) {
@ -829,7 +829,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
(data->req.httpcode != 401) && (data->req.httpcode != 407) &&
Curl_is_absolute_url(newurl, NULL, 0, FALSE)) {
/* If this is not redirect due to a 401 or 407 response and an absolute
URL: don't allow a custom port number */
URL: do not allow a custom port number */
disallowport = TRUE;
}
@ -907,8 +907,8 @@ CURLcode Curl_follow(struct Curl_easy *data,
}
if(type == FOLLOW_FAKE) {
/* we're only figuring out the new url if we would've followed locations
but now we're done so we can get out! */
/* we are only figuring out the new URL if we would have followed locations
but now we are done so we can get out! */
data->info.wouldredirect = newurl;
if(reachedmax) {
@ -945,15 +945,15 @@ CURLcode Curl_follow(struct Curl_easy *data,
/* 306 - Not used */
/* 307 - Temporary Redirect */
default: /* for all above (and the unknown ones) */
/* Some codes are explicitly mentioned since I've checked RFC2616 and they
* seem to be OK to POST to.
/* Some codes are explicitly mentioned since I have checked RFC2616 and
* they seem to be OK to POST to.
*/
break;
case 301: /* Moved Permanently */
/* (quote from RFC7231, section 6.4.2)
*
* Note: For historical reasons, a user agent MAY change the request
* method from POST to GET for the subsequent request. If this
* method from POST to GET for the subsequent request. If this
* behavior is undesired, the 307 (Temporary Redirect) status code
* can be used instead.
*
@ -979,7 +979,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
/* (quote from RFC7231, section 6.4.3)
*
* Note: For historical reasons, a user agent MAY change the request
* method from POST to GET for the subsequent request. If this
* method from POST to GET for the subsequent request. If this
* behavior is undesired, the 307 (Temporary Redirect) status code
* can be used instead.
*
@ -1020,14 +1020,14 @@ CURLcode Curl_follow(struct Curl_easy *data,
break;
case 304: /* Not Modified */
/* 304 means we did a conditional request and it was "Not modified".
* We shouldn't get any Location: header in this response!
* We should not get any Location: header in this response!
*/
break;
case 305: /* Use Proxy */
/* (quote from RFC2616, section 10.3.6):
* "The requested resource MUST be accessed through the proxy given
* by the Location field. The Location field gives the URI of the
* proxy. The recipient is expected to repeat this single request
* proxy. The recipient is expected to repeat this single request
* via the proxy. 305 responses MUST only be generated by origin
* servers."
*/
@ -1049,8 +1049,9 @@ CURLcode Curl_retry_request(struct Curl_easy *data, char **url)
bool retry = FALSE;
*url = NULL;
/* if we're talking upload, we can't do the checks below, unless the protocol
is HTTP as when uploading over HTTP we will still get a response */
/* if we are talking upload, we cannot do the checks below, unless the
protocol is HTTP as when uploading over HTTP we will still get a
response */
if(data->state.upload &&
!(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)))
return CURLE_OK;
@ -1096,7 +1097,7 @@ 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're about
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
@ -1159,7 +1160,7 @@ static void xfer_setup(
if(size > 0)
Curl_pgrsSetDownloadSize(data, size);
}
/* we want header and/or body, if neither then don't do this! */
/* we want header and/or body, if neither then do not do this! */
if(k->getheader || !data->req.no_body) {
if(sockindex != -1)