-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Take encoding into account when parsing link headers & early hints #9715
Comments
I think using UTF-8 would be better, ignoring the Content-Type. Especially because Content-Type might not arrive by early hints time, right? |
Right. I think it's a matter of calling steps 3-6 of https://html.spec.whatwg.org/#parse-a-url instead of running the whole algorithm. |
+1 to use UTF-8. Early hints are introduced recently so I guess it's not so harmful to assume servers that speak early hints use UTF-8. |
It would be good to write tests to see what browsers do for non-early I hope that at least some browsers always use UTF-8, and so we can have the simple rule "if it's a |
- Use the document encoding for link elements - Always use UTF8 for link headers/early hints Closes whatwg#9715
See #9709 (comment)
Usually we use the document's encoding when parsing URLs in link headers, but that doesn't exist yet for early hints & link headers, so we need to use something, probably the
charset
param of the document'scontent-type
header. /cc @bashiThe text was updated successfully, but these errors were encountered: