summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Talbert <swt@techie.net>2022-07-24 18:31:35 -0400
committerGitHub <noreply@github.com>2022-07-24 18:31:35 -0400
commitf2153f63566d747975ed1532b874b311d7f3b86f (patch)
tree7c4b29615088427120ea44ebb1ed7b6bb061dd3f
parentb0c938de7be67e3c76b0f7c3a97009080373f9af (diff)
parent25dc199accf79f788b045016357f1e7eb45fd9e9 (diff)
downloadpycurl-f2153f63566d747975ed1532b874b311d7f3b86f.tar.gz
Merge pull request #763 from swt2c/add_http09_allowed
Add HTTP09_ALLOWED option
-rw-r--r--src/module.c3
-rw-r--r--tests/option_constants_test.py6
2 files changed, 9 insertions, 0 deletions
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()