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

clarify upgrade token case-sensitivity #8

Closed
reschke opened this issue Sep 23, 2015 · 17 comments
Closed

clarify upgrade token case-sensitivity #8

reschke opened this issue Sep 23, 2015 · 17 comments

Comments

@reschke
Copy link
Contributor

reschke commented Sep 23, 2015

https://lists.w3.org/Archives/Public/ietf-http-wg/2015JulSep/0390.html

@mnot mnot added the semantics label Jun 20, 2017
@reschke
Copy link
Contributor Author

reschke commented Jun 29, 2018

Citing @royfielding selectively:

They are case-sensitive.

I do not necessarily disagree, but don't see anything saying that, except for the use of the "token" ABNF production. Should we clarify?

@reschke
Copy link
Contributor Author

reschke commented Jun 29, 2018

Also, if we agree on the case-sensitivity, we should raise a bug report against RFC 6455.

@reschke
Copy link
Contributor Author

reschke commented Aug 8, 2018

Erratum against RFC 6455: https://www.rfc-editor.org/errata/eid5453

@reschke reschke changed the title define upgrade token case-sensitivity clarify upgrade token case-sensitivity Aug 8, 2018
@reschke
Copy link
Contributor Author

reschke commented Aug 9, 2018

See also mail wrt ws-over-http2 at https://lists.w3.org/Archives/Public/ietf-http-wg/2018JulSep/0169.html

@royfielding
Copy link
Member

Hmm, while the token is case-sensitive, that does not imply that a recipient must limit itself to case-sensitive match (unless, for some bizarre reason, two tokens that differ by case are distinctly implemented by the recipient).

@royfielding
Copy link
Member

IOW, we should ideally write that the token is intended to be case-sensitive and senders SHOULD (or MUST) generate the same case as the registered token, but a recipient MAY interpret a received token case-insensitively (for robustness) when there is no potential for misinterpretation.

This is hop-by-hop, so no worries about intermediary confusion.

@reschke
Copy link
Contributor Author

reschke commented Sep 19, 2018

How is a recipient supposed to know whether there is no potential for misinterpretation?

If we allow the registry to contain "a" and "A" with different meanings, it can't know for sure.

If we don't allow that, the upgrade token essentially is case-insensitive, no?

@royfielding
Copy link
Member

Because the recipient is going to choose one and signal what it is to the client. It isn’t going to choose something it hasn’t implemented, so it either has more than one implementation for different cases, or one for all cases, or one for the right case and ignores badly cased tokens. Forcing a given choice on the recipient in this situation is not going to improve interoperability because both ends have to agree.

@reschke
Copy link
Contributor Author

reschke commented Sep 19, 2018

Yes, but if the client wants "A", and the server understands that as "a", and those are indeed different protocols, don't we have an interop problem?

It seems to me it would be far easier to say that the value is to be compared case-insensitively, and just adjust the IANA registration to deal with that.

@royfielding
Copy link
Member

Okay, you have convinced me. I don't want this to be confused with other uses of the protocol ABNF rule, but I don't see any value in registering case-confusing tokens.

@mnot
Copy link
Member

mnot commented Oct 8, 2018

In the meantime, in the registry:

WebSocket | The Web Socket Protocol |   | [RFC6455]
websocket | The Web Socket Protocol |   | [RFC6455][RFC8441]

@reschke
Copy link
Contributor Author

reschke commented Oct 10, 2018

@royfielding - so are you now ok with #131 ?

@royfielding
Copy link
Member

I updated the PR to make protocol-name case-insensitive (with preferred case registered).

@ioquatix
Copy link

ioquatix commented Jun 6, 2021

Is this official yet?

@reschke
Copy link
Contributor Author

reschke commented Jun 7, 2021

What do you mean by "official"?

@ioquatix
Copy link

ioquatix commented Jun 7, 2021

Is it published in any RFC? Should we depend on this behaviour?

@reschke
Copy link
Contributor Author

reschke commented Jun 7, 2021

The specs are currently in "IETF Last Call", ending June 10. See https://lists.w3.org/Archives/Public/ietf-http-wg/2021AprJun/0154.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants