Skip to content

Commit

Permalink
+ HTTP_VERSION_3
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Feb 13, 2020
1 parent 4bedf69 commit cc5ae8b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,10 @@
`CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE', and to 0 if you don't. */
#undef HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE

/* Define to 1 if you have the declaration of `CURL_HTTP_VERSION_3', and to 0
if you don't. */
#undef HAVE_DECL_CURL_HTTP_VERSION_3

/* Define to 1 if you have the declaration of `CURL_SSLVERSION_TLSv1_0', and
to 0 if you don't. */
#undef HAVE_DECL_CURL_SSLVERSION_TLSV1_0
Expand Down
13 changes: 13 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -8452,6 +8452,19 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "CURL_HTTP_VERSION_3" "ac_cv_have_decl_CURL_HTTP_VERSION_3" "
#include \"curl/curl.h\"
"
if test "x$ac_cv_have_decl_CURL_HTTP_VERSION_3" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CURL_HTTP_VERSION_3 $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "CURL_VERSION_TLSAUTH_SRP" "ac_cv_have_decl_CURL_VERSION_TLSAUTH_SRP" "
#include \"curl/curl.h\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ CURLMOPT_MAX_HOST_CONNECTIONS,
CURL_SSLVERSION_TLSv1_0, CURL_SSLVERSION_TLSv1_1, CURL_SSLVERSION_TLSv1_2, CURL_SSLVERSION_TLSv1_3,
CURL_HTTP_VERSION_2, CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_2TLS,
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, CURL_HTTP_VERSION_3,
CURL_VERSION_TLSAUTH_SRP, CURL_VERSION_NTLM_WB],
[], [],
Expand Down
9 changes: 7 additions & 2 deletions curl-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,11 @@ static void handle_HTTP_VERSION(Connection *conn, value option)
case 5:
#if HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
version = CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE;
#endif
break;
case 6:
#if HAVE_DECL_CURL_HTTP_VERSION_3
version = CURL_HTTP_VERSION_3;
#endif
break;
default:
Expand Down Expand Up @@ -4505,8 +4510,8 @@ struct used_enum

struct used_enum check_enums[] = {
{ CURLINFO_SSL_DATA_OUT, CURLINFO_END, "DEBUGFUNCTION curl_infotype" },
#if HAVE_DECL_CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
CURL_ENUM(HTTP_VERSION, 2_PRIOR_KNOWLEDGE),
#if HAVE_DECL_CURL_HTTP_VERSION_3
CURL_ENUM(HTTP_VERSION, 3),
#endif
#if HAVE_DECL_CURLINFO_CERTINFO
{ CURLINFO_CERTINFO & CURLINFO_MASK, CURLINFO_LASTONE, "CURLINFO" },
Expand Down
1 change: 1 addition & 0 deletions curl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ type curlHTTPVersion =
| HTTP_VERSION_2
| HTTP_VERSION_2TLS
| HTTP_VERSION_2_PRIOR_KNOWLEDGE
| HTTP_VERSION_3

type curlDebugType =
| DEBUGTYPE_TEXT
Expand Down
1 change: 1 addition & 0 deletions curl.mli
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ type curlHTTPVersion =
| HTTP_VERSION_2 (** please use HTTP 2 (requires libcurl >= 7.33.0, otherwise will fallback to libcurl choice) *)
| HTTP_VERSION_2TLS (** use version 2 for HTTPS, version 1.1 for HTTP (requires libcurl >= 7.47.0) *)
| HTTP_VERSION_2_PRIOR_KNOWLEDGE (** Issue non-TLS HTTP requests using HTTP/2 without HTTP/1 (requires libcurl >= 7.49.0) *)
| HTTP_VERSION_3 (** Makes use of explicit HTTP/3 without fallback. Use CURLOPT_ALTSVC to enable HTTP/3 upgrade (requires libcurl >= 7.66.0) *)

type curlDebugType =
| DEBUGTYPE_TEXT
Expand Down

0 comments on commit cc5ae8b

Please sign in to comment.