diff --git a/httpie/ssl_.py b/httpie/ssl_.py index af5ca548db..33fde598bd 100644 --- a/httpie/ssl_.py +++ b/httpie/ssl_.py @@ -48,6 +48,13 @@ def __init__( ssl_version=ssl_version, ciphers=ciphers, ) + # workaround for a bug in requests 2.32.3, see: + # https://github.com/httpie/cli/issues/1583 + if getattr(self._ssl_context, 'load_default_certs', None) is not None: + # if load_default_certs is present, get_ca_certs must be + # also, no need for another getattr + if not self._ssl_context.get_ca_certs(): + self._ssl_context.load_default_certs() super().__init__(**kwargs) def init_poolmanager(self, *args, **kwargs):