diff options
author | Scott Talbert <swt@techie.net> | 2022-11-30 21:47:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 21:47:02 -0500 |
commit | 599df7329b0c8bc8606f04a1248460073957b078 (patch) | |
tree | 7ea8bb4050de64b8025c486b497e57eeba8f39c6 | |
parent | ef76f5b8780b3684cd91869358f3a647a7b92c33 (diff) | |
parent | 19d037ea18f47c389907f87b300c8c9de14d285b (diff) | |
download | pycurl-599df7329b0c8bc8606f04a1248460073957b078.tar.gz |
Merge pull request #778 from swt2c/http_version_3
Add support for CURL_HTTP_VERSION_3
-rw-r--r-- | src/module.c | 3 | ||||
-rw-r--r-- | tests/option_constants_test.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 8efeab3..d55d3eb 100644 --- a/src/module.c +++ b/src/module.c @@ -1136,6 +1136,9 @@ initpycurl(void) insint_c(d, "CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE", CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE); insint_c(d, "TCP_FASTOPEN", CURLOPT_TCP_FASTOPEN); #endif +#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 66, 0) + insint_c(d, "CURL_HTTP_VERSION_3", CURL_HTTP_VERSION_3); +#endif insint_c(d, "CURL_HTTP_VERSION_LAST", CURL_HTTP_VERSION_LAST); /* CURL_NETRC_OPTION: constants for setopt(NETRC, x) */ diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py index abba20e..479c4e7 100644 --- a/tests/option_constants_test.py +++ b/tests/option_constants_test.py @@ -496,6 +496,10 @@ class OptionConstantsSettingTest(unittest.TestCase): def test_http_version_2prior_knowledge(self): self.curl.setopt(self.curl.HTTP_VERSION, self.curl.CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) + @util.min_libcurl(7, 66, 0) + def test_http_version_3(self): + self.curl.setopt(self.curl.HTTP_VERSION, self.curl.CURL_HTTP_VERSION_3) + @util.min_libcurl(7, 21, 5) def test_sockopt_constants(self): assert self.curl.SOCKOPT_OK is not None |