From 25dc199accf79f788b045016357f1e7eb45fd9e9 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 24 Jul 2022 18:20:09 -0400 Subject: Add HTTP09_ALLOWED option Fixes #762. --- src/module.c | 3 +++ tests/option_constants_test.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/module.c b/src/module.c index a81391f..b520eb4 100644 --- a/src/module.c +++ b/src/module.c @@ -1080,6 +1080,9 @@ initpycurl(void) #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 62, 0) insint_c(d, "DOH_URL", CURLOPT_DOH_URL); #endif +#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 64, 0) + insint_c(d, "HTTP09_ALLOWED", CURLOPT_HTTP09_ALLOWED); +#endif #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 80, 0) insint_c(d, "MAXLIFETIME_CONN", CURLOPT_MAXLIFETIME_CONN); #endif diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py index 9eda4e3..0f9b5a0 100644 --- a/tests/option_constants_test.py +++ b/tests/option_constants_test.py @@ -373,6 +373,12 @@ class OptionConstantsTest(unittest.TestCase): curl.setopt(curl.SSL_OPTIONS, curl.SSLOPT_NO_REVOKE) curl.close() + @util.min_libcurl(7, 64, 0) + def test_http09_allowed_option(self): + curl = pycurl.Curl() + curl.setopt(curl.HTTP09_ALLOWED, 1) + curl.close() + class OptionConstantsSettingTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() -- cgit v1.2.1