From 026840e35c7359c23741afe633bd3ab4b121c4ed Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Aug 2019 14:17:48 +0200 Subject: CURLOPT_HTTP_VERSION: seting this to 3 forces HTTP/3 use directly Even though it cannot fall-back to a lower HTTP version automatically. The safer way to upgrade remains via CURLOPT_ALTSVC. CURLOPT_H3 no longer has any bits that do anything and might be removed before we remove the experimental label. Updated the curl tool accordingly to use "--http3". Closes #4197 --- src/tool_cfgable.h | 1 - src/tool_getparam.c | 8 ++++---- src/tool_help.c | 2 +- src/tool_operate.c | 3 --- 4 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index f6248c20b..ff80f8eb8 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -259,7 +259,6 @@ struct OperationConfig { 0 is valid. default: CURL_HET_DEFAULT. */ bool haproxy_protocol; /* whether to send HAProxy protocol v1 */ bool disallow_username_in_url; /* disallow usernames in URLs */ - bool h3direct; /* go HTTP/3 directly */ struct GlobalConfig *global; struct OperationConfig *prev; struct OperationConfig *next; /* Always last in the struct */ diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 952e602ed..2c1868383 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -201,7 +201,7 @@ static const struct LongShort aliases[]= { {"01", "http1.1", ARG_NONE}, {"02", "http2", ARG_NONE}, {"03", "http2-prior-knowledge", ARG_NONE}, - {"04", "http3-direct", ARG_NONE}, + {"04", "http3", ARG_NONE}, {"09", "http0.9", ARG_BOOL}, {"1", "tlsv1", ARG_NONE}, {"10", "tlsv1.0", ARG_NONE}, @@ -1198,9 +1198,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ /* HTTP version 2.0 over clean TCP*/ config->httpversion = CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE; break; - case '4': /* --http3-direct */ - /* HTTP version 3 over QUIC - at once */ - config->h3direct = toggle; + case '4': /* --http3 */ + /* HTTP version 3 go over QUIC - at once */ + config->httpversion = CURL_HTTP_VERSION_3; break; case '9': /* Allow HTTP/0.9 responses! */ diff --git a/src/tool_help.c b/src/tool_help.c index 86bd692d9..cb0afef56 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -191,7 +191,7 @@ static const struct helptxt helptext[] = { "Use HTTP 2"}, {" --http2-prior-knowledge", "Use HTTP 2 without HTTP/1.1 Upgrade"}, - {" --http3-direct", + {" --http3", "Use HTTP v3"}, {" --ignore-content-length", "Ignore the size of the remote resource"}, diff --git a/src/tool_operate.c b/src/tool_operate.c index 01ee20061..c9189bdee 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1132,9 +1132,6 @@ static CURLcode create_transfers(struct GlobalConfig *global, if(config->tcp_fastopen) my_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L); - if(config->h3direct) - my_setopt(curl, CURLOPT_H3, CURLH3_DIRECT); - /* where to store */ my_setopt(curl, CURLOPT_WRITEDATA, per); my_setopt(curl, CURLOPT_INTERLEAVEDATA, per); -- cgit v1.2.3