diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8efb7efd..37f7e5bd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,8 @@ This project adheres to `Semantic Versioning `_. `1.0.0-dev`_ (unreleased) ------------------------- +* ``--verify`` now accepts ``true``/``false`` in addition to ``yes``/``no`` + and the boolean value is case-insensitive. `0.9.8`_ (2016-12-08) --------------------- diff --git a/httpie/__init__.py b/httpie/__init__.py index 18a7fd91..abed9a91 100644 --- a/httpie/__init__.py +++ b/httpie/__init__.py @@ -2,8 +2,8 @@ HTTPie - a CLI, cURL-like tool for humans. """ -__author__ = 'Jakub Roztocil' __version__ = '1.0.0-dev' +__author__ = 'Jakub Roztocil' __licence__ = 'BSD' diff --git a/httpie/cli.py b/httpie/cli.py index 94f09a8c..7d13972f 100644 --- a/httpie/cli.py +++ b/httpie/cli.py @@ -544,10 +544,10 @@ ssl.add_argument( '--verify', default='yes', help=""" - Set to "no" to skip checking the host's SSL certificate. You can also pass - the path to a CA_BUNDLE file for private certs. You can also set the - REQUESTS_CA_BUNDLE environment variable. Defaults to "yes". - + Set to "no" (or "false") to skip checking the host's SSL certificate. + Defaults to "yes" ("true"). You can also pass the path to a CA_BUNDLE file + for private certs. (Or you can set the REQUESTS_CA_BUNDLE environment + variable instead.) """ ) ssl.add_argument( diff --git a/tests/test_ssl.py b/tests/test_ssl.py index b226186e..50f34d4c 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -73,6 +73,11 @@ class TestServerCert: r = http(httpbin_secure.url + '/get', '--verify=no') assert HTTP_OK in r + @pytest.mark.parametrize('verify_value', ['false', 'fALse']) + def test_verify_false_OK(self, httpbin_secure, verify_value): + r = http(httpbin_secure.url + '/get', '--verify', verify_value) + assert HTTP_OK in r + def test_verify_custom_ca_bundle_path( self, httpbin_secure_untrusted): r = http(httpbin_secure_untrusted + '/get', '--verify', CA_BUNDLE)