# Path: Custom/events/Zabbix/API/requests/packages/urllib3/connection.py
# class DummyConnection(object):
#     class BaseSSLError(BaseException):
# class HTTPConnection(_HTTPConnection, object):
# class HTTPSConnection(HTTPConnection):
# class VerifiedHTTPSConnection(HTTPSConnection):
# RECENT_DATE = datetime.date(2014, 1, 1)
#     def __init__(self, *args, **kw):
#     def _new_conn(self):
#     def _prepare_conn(self, conn):
#     def connect(self):
#     def __init__(self, host, port=None, key_file=None, cert_file=None,
#                  strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, **kw):
#     def connect(self):
#     def set_cert(self, key_file=None, cert_file=None,
#                  cert_reqs=None, ca_certs=None,
#                  assert_hostname=None, assert_fingerprint=None):
#     def connect(self):


import zlib
import io
from socket import timeout as SocketTimeout
from ._collections import HTTPHeaderDict
from .exceptions import ProtocolError, DecodeError, ReadTimeoutError
from .packages.six import string_types as basestring, binary_type
from .connection import HTTPException, BaseSSLError
from .util.response import is_fp_closed

                    data = self._fp.read()
                    flush_decoder = True
                else:
                    cache_content = False
                    data = self._fp.read(amt)
                    if amt != 0 and not data:  # Platform-specific: Buggy versions of Python.
                        # Close the connection when no data is returned
                        #
                        # This is redundant to what httplib/http.client _should_
                        # already do.  However, versions of python released before
                        # December 15, 2012 (http://bugs.python.org/issue16298) do
                        # not properly close the connection in all cases. There is
                        # no harm in redundantly calling close.
                        self._fp.close()
                        flush_decoder = True

            except SocketTimeout:
                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
                # there is yet no clean way to get at it from this context.
                raise ReadTimeoutError(self._pool, None, 'Read timed out.')

            except BaseSSLError as e:
                # FIXME: Is there a better way to differentiate between SSLErrors?
                if not 'read operation timed out' in str(e):  # Defensive:
                    # This shouldn't happen but just in case we're missing an edge
                    # case, let's avoid swallowing SSL errors.
                    raise

                raise ReadTimeoutError(self._pool, None, 'Read timed out.')


# Path: Custom/events/Zabbix/API/requests/packages/urllib3/connection.py
# class DummyConnection(object):
#     class BaseSSLError(BaseException):
# class HTTPConnection(_HTTPConnection, object):
# class HTTPSConnection(HTTPConnection):
# class VerifiedHTTPSConnection(HTTPSConnection):
# RECENT_DATE = datetime.date(2014, 1, 1)
#     def __init__(self, *args, **kw):
#     def _new_conn(self):
#     def _prepare_conn(self, conn):
#     def connect(self):
#     def __init__(self, host, port=None, key_file=None, cert_file=None,
#                  strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, **kw):
#     def connect(self):
#     def set_cert(self, key_file=None, cert_file=None,
#                  cert_reqs=None, ca_certs=None,
#                  assert_hostname=None, assert_fingerprint=None):
#     def connect(self):


# Path: Custom/events/Zabbix/API/requests/packages/urllib3/response.py
import zlib
import io
from socket import timeout as SocketTimeout
from ._collections import HTTPHeaderDict
from .exceptions import ProtocolError, DecodeError, ReadTimeoutError
from .packages.six import string_types as basestring, binary_type
from .connection import HTTPException, BaseSSLError
from .util.response import is_fp_closed

                    data = self._fp.read()
                    flush_decoder = True
                else:
                    cache_content = False
                    data = self._fp.read(amt)
                    if amt != 0 and not data:  # Platform-specific: Buggy versions of Python.
                        # Close the connection when no data is returned
                        #
                        # This is redundant to what httplib/http.client _should_
                        # already do.  However, versions of python released before
                        # December 15, 2012 (http://bugs.python.org/issue16298) do
                        # not properly close the connection in all cases. There is
                        # no harm in redundantly calling close.
                        self._fp.close()
                        flush_decoder = True

            except SocketTimeout:
                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
                # there is yet no clean way to get at it from this context.
                raise ReadTimeoutError(self._pool, None, 'Read timed out.')

            except BaseSSLError as e:
                # FIXME: Is there a better way to differentiate between SSLErrors?
                if not 'read operation timed out' in str(e):  # Defensive:
                    # This shouldn't happen but just in case we're missing an edge
                    # case, let's avoid swallowing SSL errors.
                    raise

                raise ReadTimeoutError(self._pool, None, 'Read timed out.')


            except HTTPException as e:
