-
Notifications
You must be signed in to change notification settings - Fork 139
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
Identifier range #702
Comments
@annevk any other characters you can think of? I'm least excited about uppercase alpha here, as it would preclude things like #685. (to be clear: this is about what existing syntaxes we can accommodate in SH without modification; it's not critical we get them all, just want to get as many as possible). |
Not immediately. I'm not sure if |
Sure, but the point here is to make sure that |
We might be talking past each other. The problem I have is that I'm not sure what the actual scope is. E.g., perhaps |
Ah. Would be good to get some tests in, then. Worst case, if characters are precluded and then it turns out they're needed they can be encoded, but that seems suboptimal. |
Discussed in Bangkok. @martinthomson suggested that we split identifiers that can be values out, to keep the "normal" identifiers simple. |
OK, they're split out into I'm going to add My first inclination is to keep the first character restricted to Thoughts? |
(i.e., talked into allowing uppercase alpha and maybe numerics; not all of the special chars). |
Also, it would be good if folks had a look at the restrictions on |
Can we later change |
@annevk nope; once it ships we can't really change it, because some implementations will fail on the characters you add. However, if you find that a header can't use identifier, you can always use string. If you're back porting to an existing header, you can define a second header that takes the string form and negotiate for it; this is the plan for existing HTTP headers that can't fit into SH. For example, if
You can define:
... and then use a HTTP/2 SETTING to negotiate (hop-by-hop) for automagically doing the right thing WRT Foo and SH-Foo. I'm expecting to do this in a separate spec soon-ish. |
Hmm okay, maybe it's not such a big problem anyway. I've started properly defining the existing headers with parsers and I haven't really run into any major issues thus far other than testing being time consuming. |
Thanks @annevk. If you find a solution to that, please tell us. |
I think the only remaining questions here are:
My inclination is yes on both at this point; but I'd be willing to be talked out of 0 especially. (yes, it consumes a lot of characters for identifying new types, but we still have a fair number of special characters left, and I don't think we'll be adding that many - famous last words ;) Thoughts? |
I think that's reasonable. |
Looking through existing headers, it seems like it would be good to consider expanding the range of characters allowable in identifiers.
.
-- gives us hostnames like inOrigin
andHost
:
-- gives us host:port structures like inAlt-Used
andAccess-Control-Allow-Origin
, as well as IPv6 addresses%
-- gives us percent-encoded data like inALPN
Access-Control-Request-Method
,Access-Control-Allow-Methods
The main constraint here is making it possible to reliably recognise identifiers. Currently they're denoted by a starting
lcapha
. It may be possible to expand that to include uppercase but continue to preclude other characters from the starting character without affecting too many use cases.The text was updated successfully, but these errors were encountered: