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

support parsing charset #34

Merged
merged 2 commits into from
May 23, 2022
Merged

support parsing charset #34

merged 2 commits into from
May 23, 2022

Conversation

chalkpe
Copy link
Contributor

@chalkpe chalkpe commented Apr 13, 2022

Add support for parsing charset directive in Content-Type header.

It seems Content-Type with both charset and boundary is not specified in the RFC 7231 or may be invalid. The current implementation parses and provides both of them anyway if specified.

Related: hapijs/subtext#95

@devinivy devinivy added this to the 6.0.0 milestone May 23, 2022
@devinivy devinivy added the feature New functionality or improvement label May 23, 2022
Copy link
Member

@devinivy devinivy left a comment

Choose a reason for hiding this comment

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

This behavior seems acceptable to me 👍 In my opinion it's fine to parse out the charset even when a boundary is present, but anyone consuming the output from Content.type() in that case should generally ignore the charset value.

@devinivy devinivy changed the base branch from master to v6 May 23, 2022 04:38
@devinivy devinivy self-assigned this May 23, 2022
@devinivy devinivy merged commit 0057e10 into hapijs:v6 May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants