1
Fork 0

nodeinfo: Report error if MIME type check fails

This commit is contained in:
Steffo 2024-11-11 03:04:20 +01:00
parent 3cfc86a8fd
commit c12b0a7869
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -139,8 +139,9 @@ impl HostMetaDocument {
let mime_type = extract_mime_from_content_type(content_type) let mime_type = extract_mime_from_content_type(content_type)
.ok_or(ContentTypeInvalid)?; .ok_or(ContentTypeInvalid)?;
log::trace!("Ensuring MIME type of `{mime_type}` is acceptable for JRD parsing..."); log::trace!("Ensuring MIME type is acceptable for XRD parsing...");
if mime_type != "application/xrd+xml" { if mime_type != "application/xrd+xml" {
log::error!("MIME type `{mime_type}` is not acceptable for XRD parsing.");
return Err(ContentTypeInvalid) return Err(ContentTypeInvalid)
} }