about summary refs log tree commit diff
path: root/src/indieauth/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/indieauth/mod.rs')
-rw-r--r--src/indieauth/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/indieauth/mod.rs b/src/indieauth/mod.rs
index f7a9712..ba19b3b 100644
--- a/src/indieauth/mod.rs
+++ b/src/indieauth/mod.rs
@@ -149,7 +149,7 @@ async fn authorization_endpoint_get<A: AuthBackend, D: Storage + 'static>(
         let metadata_request = http.get(request.client_id.clone())
             .header("Accept", "application/json, text/html");
         match metadata_request.send().await.and_then(|res| res.error_for_status()) {
-            Ok(response) if response.headers().typed_get::<ContentType>() == Some(ContentType::html()) => {
+            Ok(response) if response.headers().typed_get::<ContentType>().to_owned().map(mime::Mime::from).map(|m| m.type_() == "text" && m.subtype() == "html").unwrap_or(false) => {
                 let url = response.url().clone();
                 let text = response.text().await.unwrap();
                 tracing::debug!("Received {} bytes in response", text.len());