summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/altsvc.c
diff options
context:
space:
mode:
authordartraiden <dartraiden@protonmail.com>2020-01-12 14:12:42 +0300
committerdartraiden <dartraiden@protonmail.com>2020-01-12 14:14:27 +0300
commit69d3b201c14db069ad0aef4b21e8efb45e21df9b (patch)
tree9c168030e03459dfe2d2d6cf64511321786b41f8 /libs/libcurl/src/altsvc.c
parentdcb62e4830223c1f5233d90b855e74006fd0942b (diff)
libcurl: update to 7.68
Diffstat (limited to 'libs/libcurl/src/altsvc.c')
-rw-r--r--libs/libcurl/src/altsvc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/libcurl/src/altsvc.c b/libs/libcurl/src/altsvc.c
index 64971a9f0f..bf869c37a5 100644
--- a/libs/libcurl/src/altsvc.c
+++ b/libs/libcurl/src/altsvc.c
@@ -55,7 +55,7 @@ static enum alpnid alpn2alpnid(char *name)
if(strcasecompare(name, "h2"))
return ALPN_h2;
#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
- if(strcasecompare(name, "h3-23"))
+ if(strcasecompare(name, "h3-24"))
return ALPN_h3;
#else
if(strcasecompare(name, "h3"))
@@ -74,7 +74,7 @@ const char *Curl_alpnid2str(enum alpnid id)
return "h2";
case ALPN_h3:
#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
- return "h3-23";
+ return "h3-24";
#else
return "h3";
#endif
@@ -161,7 +161,7 @@ static CURLcode altsvc_add(struct altsvcinfo *asi, char *line)
date, &persist, &prio);
if(9 == rc) {
struct altsvc *as;
- time_t expires = curl_getdate(date, NULL);
+ time_t expires = Curl_getdate_capped(date);
as = altsvc_create(srchost, dsthost, srcalpn, dstalpn, srcport, dstport);
if(as) {
as->expires = expires;
@@ -320,8 +320,8 @@ CURLcode Curl_altsvc_save(struct altsvcinfo *altsvc, const char *file)
/* no cache activated */
return CURLE_OK;
- if((altsvc->flags & CURLALTSVC_READONLYFILE) || !file[0])
- /* marked as read-only or zero length file name */
+ if((altsvc->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
+ /* marked as read-only, no file or zero length file name */
return CURLE_OK;
out = fopen(file, FOPEN_WRITETEXT);
if(!out)