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

Passing DO content as HTTP header causes warnings in Wrangler when using Unicode #41

Open
AlCalzone opened this issue Aug 1, 2023 · 0 comments

Comments

@AlCalzone
Copy link

I'm not 100% certain that this will cause issues in production, but this change
eaf73a2#diff-5cd6061dc976728ee25d4ddb3302dddcaffd5ddd0846ffd06f96bde8bdad1331R58
causes Wrangler to complain about invalid header values when the payload sent to the DO contains Unicode characters:

Invalid header name or value: "["�",["Keys"]]". Per the Fetch specification, the Headers class may only accept header names and values which contain 8-bit characters. That is, they must not contain any Unicode code points greater than 0xFF. As a quirk, we are encoding this string in UTF-8 in the header, but in a browser this would result in a TypeError exception. Consider encoding this string in ASCII for compatibility with browser implementations of the Fetch specification.

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

No branches or pull requests

1 participant