url: str,
bootstrap_address: Optional[str] = None,
verify: Union[bool, str] = True,
+ want_get: bool = False,
):
super().__init__()
self.url = url
self.bootstrap_address = bootstrap_address
self.verify = verify
+ self.want_get = want_get
def kind(self):
return "DoH"
request,
self.url,
timeout=timeout,
+ source=source,
+ source_port=source_port,
bootstrap_address=self.bootstrap_address,
one_rr_per_rrset=one_rr_per_rrset,
ignore_trailing=ignore_trailing,
verify=self.verify,
+ post=(not self.want_get),
)
async def async_query(
request,
self.url,
timeout=timeout,
+ source=source,
+ source_port=source_port,
bootstrap_address=self.bootstrap_address,
one_rr_per_rrset=one_rr_per_rrset,
ignore_trailing=ignore_trailing,
verify=self.verify,
+ post=(not self.want_get),
)
feature like DoH is not desired in dnspython, but an old httpx is installed
along with dnspython for some other purpose.
+* The DoHNameserver class now allows GET to be used instead of the default POST,
+ and also passes source and source_port correctly to the underlying query
+ methods.
+
2.5.0
-----