nodeinfo
: Allow MIME type of application/jrd+json
This commit is contained in:
parent
a74ee45f6e
commit
76783eabe4
2 changed files with 8 additions and 4 deletions
|
@ -82,8 +82,12 @@ impl HostMetaDocument {
|
|||
let mime_type = extract_mime_from_content_type(content_type)
|
||||
.ok_or(ContentTypeInvalid)?;
|
||||
|
||||
log::trace!("Ensuring MIME type of `{mime_type}` is acceptable for JRD parsing...");
|
||||
if mime_type != "application/json" {
|
||||
log::trace!("Ensuring MIME type is acceptable for JRD parsing...");
|
||||
if mime_type == "application/jrd+json" {
|
||||
log::warn!("MIME type `{mime_type}` would not be acceptable for JRD parsing, but is temporarily allowed anyways due to widespread use.")
|
||||
}
|
||||
else if mime_type != "application/json" {
|
||||
log::error!("MIME type `{mime_type}` is not acceptable for JRD parsing.");
|
||||
return Err(ContentTypeInvalid)
|
||||
}
|
||||
|
||||
|
|
|
@ -62,10 +62,10 @@ test!(iceshrimpnet, "https://ice.frieren.quest");
|
|||
|
||||
test!(gotosocial, "https://alpha.polymaths.social");
|
||||
|
||||
test!(bridgyfed, "https://fed.brid.gy", ignore = "Returns application/jrd+json");
|
||||
test!(bridgyfed, "https://fed.brid.gy");
|
||||
|
||||
test!(threads, "https://threads.net", ignore = "Not implemented on their end");
|
||||
|
||||
test!(snac, "https://ngoa.giao.loan", ignore = "Does not support host-meta");
|
||||
|
||||
test!(hollo, "https://hollo.social", ignore = "Returns application/jrd+json, does not support host-meta");
|
||||
test!(hollo, "https://hollo.social", ignore = "Does not support host-meta");
|
||||
|
|
Loading…
Reference in a new issue