Skip to content

fix(header): enforce string constructors to only allow ASCII - #860

Open
seanmonstar wants to merge 1 commit into
masterfrom
sean/pmmoslwwysvv
Open

fix(header): enforce string constructors to only allow ASCII#860
seanmonstar wants to merge 1 commit into
masterfrom
sean/pmmoslwwysvv

Conversation

@seanmonstar

Copy link
Copy Markdown
Member

This refactors the internals with better names and comments to know when opaque UTF8 bytes are allowed to construct a HeaderValue vs not. A few cases of string constructors were allowing them even though the documentation said they were not allowed. Other string cases properly enforced it.

I suspect this will may catch some uses in the wild. Sorry about the disruption, but it was an oversight. If those bytes are required, you should do as the docs warn: use the from_bytes constructor.

cc #859

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.

1 participant