Currently, if /.well-known/webfinger returns HTTP 200 and a valid webfinger response, but returns a generic content type like application/octet-stream, this library throws an error. Instead, it should fall back and parse the document anyway, probably assuming it's XML format. Bonus points if it can inspect the first character and handle JSON or XML appropriately.
This library already does not care what content-type header is returned for the /.well-known/host-meta URL.
Currently, if
/.well-known/webfinger
returns HTTP 200 and a valid webfinger response, but returns a generic content type likeapplication/octet-stream
, this library throws an error. Instead, it should fall back and parse the document anyway, probably assuming it's XML format. Bonus points if it can inspect the first character and handle JSON or XML appropriately.This library already does not care what content-type header is returned for the
/.well-known/host-meta
URL.