summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/hsts.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2024-07-25 00:50:30 +0300
committerdartraiden <wowemuh@gmail.com>2024-07-25 02:38:23 +0300
commit67a42fc97c64c83e02f6f0d68e5a4a22c71138d3 (patch)
tree21eb2d53a9cd7e645a58662dee11588f56057eee /libs/libcurl/src/hsts.c
parent0a365886f2d06750a707037d894e1492988eb53c (diff)
libcurl: update to 8.9.0
Diffstat (limited to 'libs/libcurl/src/hsts.c')
-rw-r--r--libs/libcurl/src/hsts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/libcurl/src/hsts.c b/libs/libcurl/src/hsts.c
index 8a871f77a4..635bd6100d 100644
--- a/libs/libcurl/src/hsts.c
+++ b/libs/libcurl/src/hsts.c
@@ -54,7 +54,7 @@
#define MAX_HSTS_DATELENSTR "64"
#define UNLIMITED "unlimited"
-#ifdef DEBUGBUILD
+#if defined(DEBUGBUILD) || defined(UNITTESTS)
/* to play well with debug builds, we can *set* a fixed time this will
return */
time_t deltatime; /* allow for "adjustments" for unit test purposes */
@@ -241,7 +241,7 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname,
}
/*
- * Return TRUE if the given host name is currently an HSTS one.
+ * Return TRUE if the given hostname is currently an HSTS one.
*
* The 'subdomain' argument tells the function if subdomain matching should be
* attempted.
@@ -368,7 +368,7 @@ CURLcode Curl_hsts_save(struct Curl_easy *data, struct hsts *h,
file = h->filename;
if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
- /* marked as read-only, no file or zero length file name */
+ /* marked as read-only, no file or zero length filename */
goto skipsave;
result = Curl_fopen(data, file, &out, &tempstore);
@@ -393,7 +393,7 @@ CURLcode Curl_hsts_save(struct Curl_easy *data, struct hsts *h,
free(tempstore);
skipsave:
if(data->set.hsts_write) {
- /* if there's a write callback */
+ /* if there is a write callback */
struct curl_index i; /* count */
i.total = h->list.size;
i.index = 0;
@@ -440,7 +440,7 @@ static CURLcode hsts_add(struct hsts *h, char *line)
if(!e)
result = hsts_create(h, p, subdomain, expires);
else {
- /* the same host name, use the largest expire time */
+ /* the same hostname, use the largest expire time */
if(expires > e->expires)
e->expires = expires;
}
@@ -508,7 +508,7 @@ static CURLcode hsts_load(struct hsts *h, const char *file)
CURLcode result = CURLE_OK;
FILE *fp;
- /* we need a private copy of the file name so that the hsts cache file
+ /* we need a private copy of the filename so that the hsts cache file
name survives an easy handle reset */
free(h->filename);
h->filename = strdup(file);