diff options
| author | Bob Halley <halley@dnspython.org> | 2020-05-08 06:43:50 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2020-05-08 06:43:50 -0700 |
| commit | b6dc6a9620cf4c0d4bdacc749473203c18727eaa (patch) | |
| tree | 745acd550c9cb4716e2d549049667960302e4966 /dns/query.py | |
| parent | b4a0c76de17e4528a9bda3d7f6f71b0fe28f6050 (diff) | |
| download | dnspython-b6dc6a9620cf4c0d4bdacc749473203c18727eaa.tar.gz | |
remove send_https() as the send/receive split is too hard for HTTPS and it is not adding anything over https()
Diffstat (limited to 'dns/query.py')
| -rw-r--r-- | dns/query.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/dns/query.py b/dns/query.py index 8e22570..017dcba 100644 --- a/dns/query.py +++ b/dns/query.py @@ -228,22 +228,6 @@ def _destination_and_source(af, where, port, source, source_port, destination = None return (af, destination, source) -def send_https(session, what, lifetime=None): - """ - :param session: a :class:`requests.sessions.Session` - :param what: a :class:`requests.models.Request` or - :class:`requests.models.PreparedRequest`. - If it's a :class:`requests.models.Request`, it will be converted - into a :class:`requests.models.PreparedRequest`. - :param lifetime: timeout (in seconds) - :return: a :class:`requests.models.Response` object. - """ - if not have_doh: - raise NoDOH - if isinstance(what, requests.models.Request): - what = what.prepare() - return session.send(what, timeout=lifetime) - def https(q, where, timeout=None, port=443, af=None, source=None, source_port=0, one_rr_per_rrset=False, ignore_trailing=False, session=None, path='/dns-query', post=True, @@ -336,7 +320,7 @@ def https(q, where, timeout=None, port=443, af=None, source=None, source_port=0, }) response = session.post(url, headers=headers, data=wire, stream=True, timeout=timeout, - verify=verify) + verify=verify) else: wire = base64.urlsafe_b64encode(wire).decode('utf-8').strip("=") url += "?dns={}".format(wire) |
