-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
store header char check too strict? #47479
Comments
@nodejs/http |
I just noticed nodejs/undici#2020 but it seems like no one has a solution. Help would be appreciated. |
I think this is a change we might want to revert. cc @nodejs/tsc |
Which change? |
I think we should revert this #46528 and rethink a better solution, the problem that this pr tried to solve is smaller than the one it created |
https://httpwg.org/specs/rfc9110.html#fields.values still says:
Thus technically node is in the clear. The spec also says this:
But the
So I suppose we could transmit the character as C3 A5 (UTF-8) and well-behaved recipients will accept it but then it's ambiguous how the recipient decodes it. Probably as ISO-8859-1. We could also transcode from UTF-8 to ISO-8859-1 but that's lossy and it still doesn't really resolve the ambiguity. RFC8187 defines a configurable character encoding scheme for HTTP header values but literally nothing supports it AFAIK so yeah, good idea but not very practical. |
I tend to agree with Ben: if the spec allows that, we allow it as well. |
Newer RFCs generally obsolete older ones so, unless there's very good reason not to, node should follow the newer one. |
I absolutely agree. I'm also willing to follow the newer RFC. |
Should we close this then? |
closing this as we already implement the latest rfc. |
Not sure what is correct here but a test in undici started to fail in node 19 with:
Invalid character in header content ["content-disposition"]
With:
I don't think
å
should cause problems?The text was updated successfully, but these errors were encountered: