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

Relationship to the ABNF #Rule #596

Closed
jyasskin opened this issue May 1, 2018 · 8 comments
Closed

Relationship to the ABNF #Rule #596

jyasskin opened this issue May 1, 2018 · 8 comments

Comments

@jyasskin
Copy link
Contributor

jyasskin commented May 1, 2018

As @reschke points out in https://lists.w3.org/Archives/Public/ietf-http-wg/2018JanMar/0209.html, https://tools.ietf.org/html/rfc7230#section-3.2.2 says:

A sender MUST NOT generate multiple header fields with the same field
name in a message unless either the entire field value for that
header field is defined as a comma-separated list [i.e., #(values)]
or the header field is a well-known exception (as noted below).

draft-ietf-httpbis-header-structure should explicitly override that prohibition for lists, dictionaries, and parameterised lists. It could do this by using the # construct in the ABNF for those types, but because the parsing algorithm in structured headers isn't actually driven by the ABNF, I'm not sure that's the right approach.

The parsing side is already handled by http://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#text.

@reschke
Copy link
Contributor

reschke commented May 1, 2018

-1 on "overriding" anything the base spec says.

If you want list semantics, use the matching ABNF notation.

@jyasskin
Copy link
Contributor Author

jyasskin commented May 1, 2018

To be clear, I have no objection to using the # ABNF notation if that's what folks think is best.

@mnot
Copy link
Member

mnot commented May 1, 2018

I don't think we should tie requirements for handling of HTTP extensions into what convention is used to define their syntax. Will raise an issue against httpwg/http-core.

@reschke
Copy link
Contributor

reschke commented May 2, 2018

Maybe, but the core question is the behavior, not the syntax (handling empty elements, for instance).

@annevk
Copy link

annevk commented Jun 4, 2018

Why is empty special? I'd expect

A-SH-That-Takes-A-String: "Hello
a-SH-That-takes-a-string: 
a-sh-that-takes-a-string: World"

to yield Hello,,World. Might be worth adding some explicit examples if they're not already there of course.

@reschke
Copy link
Contributor

reschke commented Jun 4, 2018

Nope. It would yield Hello,World. See https://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.7.p.4

@mnot mnot changed the title Structured headers should explicitly allow multiple same-named headers Relationship to the ABNF #Rule Jun 13, 2018
@mnot
Copy link
Member

mnot commented Aug 19, 2018

I think this can be closed, as the current draft recommends the use of ABNF, and the core issue seems to be heading in the direction of not tying those semantics to the # rule.

Do we need specific text to handle the situation outlined above (with a blank header line) to assure that it's handled correctly? If so please open an issue dedicated to that.

@mnot mnot closed this as completed Aug 19, 2018
@annevk
Copy link

annevk commented Aug 20, 2018

Filed #686 on that, seems useful especially as I suspect that not many implementations get that right.

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