[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 92/282: curl: error on --alt-svc use w/o support
From: |
gnunet |
Subject: |
[gnurl] 92/282: curl: error on --alt-svc use w/o support |
Date: |
Wed, 01 Apr 2020 14:29:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 1cc97ba6e42820ad0d8d69ba101b3b830aa1316d
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Feb 4 17:32:55 2020 +0100
curl: error on --alt-svc use w/o support
Make the tool check for alt-svc support at run-time and return error
accordingly if not present when the option is used.
Reported-by: Harry Sintonen
Closes #4878
---
src/tool_getparam.c | 5 ++++-
src/tool_operate.c | 3 ---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 1a72edf3e..764caa203 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1278,7 +1278,10 @@ ParameterError getparameter(const char *flag, /* f or
-long-flag */
case 'b':
switch(subletter) {
case 'a': /* --alt-svc */
- GetStr(&config->altsvc, nextarg);
+ if(curlinfo->features & CURL_VERSION_ALTSVC)
+ GetStr(&config->altsvc, nextarg);
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
break;
default: /* --cookie string coming up: */
if(nextarg[0] == '@') {
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 2855f0f8f..4b3caa80c 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1966,11 +1966,8 @@ static CURLcode single_transfer(struct GlobalConfig
*global,
if(config->disallow_username_in_url)
my_setopt(curl, CURLOPT_DISALLOW_USERNAME_IN_URL, 1L);
-#ifdef USE_ALTSVC
- /* only if explicitly enabled in configure */
if(config->altsvc)
my_setopt_str(curl, CURLOPT_ALTSVC, config->altsvc);
-#endif
#ifdef USE_METALINK
if(!metalink && config->use_metalink) {
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 79/282: travis: update non-OpenSSL Linux jobs to Bionic, (continued)
- [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, 2020/04/01
- [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 <=
- [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
- [gnurl] 103/282: github: Instructions to post "uname -a" on Unix systems in issues, gnunet, 2020/04/01
- [gnurl] 94/282: scripts: use last set tag if none given, gnunet, 2020/04/01
- [gnurl] 98/282: ftp: remove superfluous checking for crlf in user or pwd, gnunet, 2020/04/01
- [gnurl] 105/282: url: Include the failure reason when curl_win32_idn_to_ascii() fails, gnunet, 2020/04/01