From f5a272d8b93d692a8029827cdb4964f1d6a7e502 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Mon, 11 Nov 2024 09:37:39 -0800 Subject: [PATCH] parse non-normative mime type for did method resolver Signed-off-by: Ryan Tate --- crates/dids/methods/web/Cargo.toml | 2 +- crates/dids/methods/web/src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/dids/methods/web/Cargo.toml b/crates/dids/methods/web/Cargo.toml index 5996016b..3d364426 100644 --- a/crates/dids/methods/web/Cargo.toml +++ b/crates/dids/methods/web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "did-web" -version = "0.3.2" +version = "0.3.3" authors = ["Spruce Systems, Inc."] edition = "2021" license = "Apache-2.0" diff --git a/crates/dids/methods/web/src/lib.rs b/crates/dids/methods/web/src/lib.rs index eb32545b..f29b41d4 100644 --- a/crates/dids/methods/web/src/lib.rs +++ b/crates/dids/methods/web/src/lib.rs @@ -125,6 +125,7 @@ impl DIDMethodResolver for DIDWeb { .get(header::CONTENT_TYPE) .map(|value| match value.as_bytes() { b"application/json" => Ok(MediaType::Json), + b"application/json; charset=utf-8" => Ok(MediaType::Json), other => MediaType::from_bytes(other), }) .transpose()?