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

Cookie-Indices should specify how unexpected values are handled #346

Open
jeremyroman opened this issue Mar 19, 2024 · 1 comment
Open

Comments

@jeremyroman
Copy link
Contributor

(re. draft-nottingham-http-availability-hints)

@mnot's suggestion via email was:

  • ignore unrecognized parameters
  • treat other unexpected data structures like a syntax error and ignore the field (i.e., falling back to vary)

I think this makes sense; it fails safe for most cases and if we ever added a parameter where it would be incorrect for existing implementations to ignore it, we could add a must-support-whizbang or similar token which older implementations would reject.

Filed this as an issue both because it's slightly less trivial to actually make this change as I sit here, and because it's nuanced enough that someone might have second thoughts before someone sits down to address this.

@jeremyroman
Copy link
Contributor Author

One remaining case -- strings which are not valid cookie names in RFC 6265, such as strings containing one of the separators characters. Some of these are also accepted as cookies by browsers (well, at least Chromium browsers -- I haven't dug into Mozilla and WebKit), and some are not.

One possibility is to say that strings that don't match the cookie-name production are ignored (or stricter, constitute a syntax error in the entire header). Alternatively, we could accept all strings (that consist of printable ASCII characters) and simply rely on the fact that they will never compare equal to a cookie that the HTTP implementation never stored (whatever limitations it applies to cookie names).

mnot added a commit that referenced this issue Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants