bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.88k stars 486 forks source link

Accept a wider range of content types for DoH API calls. #3046

Open sgarciac opened 2 days ago

sgarciac commented 2 days ago

Currently, the DoH calls fail when using google's DoH API, since it returns "application/json; charset=UTF-8" as its response's content-type and the code expects "application/dns-json" (which seems to be particular to Cloudflare).

Notice that Alibaba Cloud's DoH returns "application/json", for example.

While there is no agreed upon MIME type for DoH's JSON Schema, it seems judicious to have the doh handle resolver to support at least the major existing APIs out of the box.