[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 89/282: altsvc: set h3 version at a common single spot
From: |
gnunet |
Subject: |
[gnurl] 89/282: altsvc: set h3 version at a common single spot |
Date: |
Wed, 01 Apr 2020 14:29:14 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit d913c1e99ee1a6de372579e849af83a48a151c54
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Feb 4 15:12:44 2020 +0100
altsvc: set h3 version at a common single spot
... and move the #ifdefs out of the functions. Addresses the fact they
were different before this change.
Reported-by: Harry Sintonen
Closes #4876
---
lib/altsvc.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/lib/altsvc.c b/lib/altsvc.c
index 0e9a97826..93cc302bd 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -48,19 +48,20 @@
#define MAX_ALTSVC_ALPNLENSTR "10"
#define MAX_ALTSVC_ALPNLEN 10
+#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
+#define H3VERSION "h3-25"
+#else
+#define H3VERSION "h3"
+#endif
+
static enum alpnid alpn2alpnid(char *name)
{
if(strcasecompare(name, "h1"))
return ALPN_h1;
if(strcasecompare(name, "h2"))
return ALPN_h2;
-#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
- if(strcasecompare(name, "h3-25"))
+ if(strcasecompare(name, H3VERSION))
return ALPN_h3;
-#else
- if(strcasecompare(name, "h3"))
- return ALPN_h3;
-#endif
return ALPN_none; /* unknown, probably rubbish input */
}
@@ -73,11 +74,7 @@ const char *Curl_alpnid2str(enum alpnid id)
case ALPN_h2:
return "h2";
case ALPN_h3:
-#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
- return "h3-24";
-#else
- return "h3";
-#endif
+ return H3VERSION;
default:
return ""; /* bad */
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 70/282: KNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header, (continued)
- [gnurl] 70/282: KNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header, gnunet, 2020/04/01
- [gnurl] 69/282: oauth2-bearer.d: works for HTTP too, gnunet, 2020/04/01
- [gnurl] 78/282: cirrus: Add some missing semicolons, gnunet, 2020/04/01
- [gnurl] 71/282: cookie: check __Secure- and __Host- case sensitively, gnunet, 2020/04/01
- [gnurl] 79/282: travis: update non-OpenSSL Linux jobs to Bionic, gnunet, 2020/04/01
- [gnurl] 77/282: cleanup: fix typos and wording in docs and comments, gnunet, 2020/04/01
- [gnurl] 85/282: ntlm: Pass the Curl_easy structure to the private winbind functions, gnunet, 2020/04/01
- [gnurl] 97/282: ntlm_wb: Use Curl_socketpair() for greater portability, gnunet, 2020/04/01
- [gnurl] 87/282: ngtcp2: fixed to only use AF_INET6 when ENABLE_IPV6, gnunet, 2020/04/01
- [gnurl] 90/282: RELEASE-PROCEDURE: feature win is closed post-release a few days, gnunet, 2020/04/01
- [gnurl] 89/282: altsvc: set h3 version at a common single spot,
gnunet <=
- [gnurl] 96/282: contributors: Also include people who contributed to curl-www, gnunet, 2020/04/01
- [gnurl] 88/282: altsvc: improved header parser, gnunet, 2020/04/01
- [gnurl] 104/282: asyn-thread: remove dead code, gnunet, 2020/04/01
- [gnurl] 92/282: curl: error on --alt-svc use w/o support, gnunet, 2020/04/01
- [gnurl] 99/282: ftp: remove the duplicated user/password struct fields, gnunet, 2020/04/01
- [gnurl] 91/282: docs/HTTP3: add --enable-alt-svc to curl's configure, gnunet, 2020/04/01
- [gnurl] 93/282: ftp: shrink temp buffers used for PORT, gnunet, 2020/04/01
- [gnurl] 102/282: configure.ac: fix comments about --with-quiche, gnunet, 2020/04/01
- [gnurl] 95/282: contrithanks: Use the most recent tag by default, gnunet, 2020/04/01
- [gnurl] 101/282: checksrc.bat: Fix not being able to run script from the main curl directory, gnunet, 2020/04/01