Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse non-normative mime type for did method resolver #627

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

Ryanmtate
Copy link
Contributor

Description

Adds a match arm for application/json; charset=utf-8 to DIDMethodResolver implementation for DIDWeb.

Other changes

Bumps patch version to 0.3.3

Tested

This change is tested as part of a compatibility check with a third-party verifier.

@CLAassistant
Copy link

CLAassistant commented Nov 11, 2024

CLA assistant check
All committers have signed the CLA.

@@ -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),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably split on ; to handle those cases if we're not going to just use a library to parse the content type header

@Ryanmtate Ryanmtate merged commit 6a21f19 into main Nov 13, 2024
3 checks passed
@Ryanmtate Ryanmtate deleted the fix/method-resolver-mime-parse branch November 13, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants