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

ABNF for "charset" is both too broad and too narrow #100

Closed
reschke opened this issue Jun 22, 2018 · 4 comments
Closed

ABNF for "charset" is both too broad and too narrow #100

reschke opened this issue Jun 22, 2018 · 4 comments

Comments

@reschke
Copy link
Contributor

reschke commented Jun 22, 2018

See https://www.rfc-editor.org/errata/eid4689

@reschke
Copy link
Contributor Author

reschke commented Jun 22, 2018

We currently use "token", but this includes characters not allowed by RFC 2978 (as corrected by https://www.rfc-editor.org/errata/eid1912).

Options:

  1. have our own ABNF
  2. refer to RFC 2978 ABNF (but warn about erratum 1912)
  3. leave the ABNF alone but point out in prose that the actual set of characters allowed here is smaller

In https://www.rfc-editor.org/errata/eid4689 it was proposed to use RFC 5987, but that would introduce a normative reference that we do not want here.

@mnot mnot changed the title RFC 7231: ABNF for "charset" is too broad ABNF for "charset" is too broad Jun 29, 2018
@reschke reschke changed the title ABNF for "charset" is too broad ABNF for "charset" is both too broad and too narrow Jul 21, 2018
@reschke
Copy link
Contributor Author

reschke commented Jul 21, 2018

Actually:

RFC2616.token: "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / DIGIT / ALPHA / "^" / "_" / "`" / "|" / "~"
RFC2978.mimecharset: "!" / "#" / "%" / "&" / "+" / "-" / DIGIT / ALPHA / "^" / "_" / "`" / "{" / "}" / "~"
Rfc2616.token - Rfc2978.mimecharsetWithErratum: "$" / "'" / "*" / "." / "|"
Rfc2978.mimecharsetWithErratum - Rfc2616.token: "{" / "}"

where RFC2978.mimecharset has the erratum 1912 applied...

So in theory "{" and "}" could appear in charset names, but are not allowed in tokens. In practice, no such charset is registered.

I'm tempted to open another erratum against 2978. Feedback appreciated.

@reschke
Copy link
Contributor Author

reschke commented Jul 22, 2018

@reschke
Copy link
Contributor Author

reschke commented Aug 8, 2018

See #130

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

No branches or pull requests

1 participant