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

Mnot 816 #824

Merged
merged 13 commits into from
Jul 4, 2019
Merged

Mnot 816 #824

merged 13 commits into from
Jul 4, 2019

Conversation

mnot
Copy link
Member

@mnot mnot commented Jul 3, 2019

Proposal for #816.

key = lcalpha *( lcalpha / DIGIT / "_" / "-" )
lcalpha = %x61-7A ; a-z
sh-list = list-member *( OWS "," OWS list-member )
list-member = sh-item / inner-list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add param-item as an option here?

Considering the fact that list and parameterized list are the two compound types that can use a ; separator, I think it would be beneficial to allow both, for example when defining a new Cache-Control directive that takes a parameterized list as an argument (pretending that Cache-Control is a SH header).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we added param-item here, it would have the effect of collapsing parameterised lists into lists -- which is possible, I think (if we could define a sane parsing algorithm that could tell the difference).

However, that doesn't seem like what you're asking for. Cache-Control maps to a dictionary; if you allowed a dictionary member to be a parameterised item, what would that look like?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that undo #443 and bring back the atomic-or-complex problem?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phluid61 Thanks for pointing that out. OTOH, am I correct in assuming that the reason we handled #443 that way is because we did not know of a good way to resolve the issue?

If that is the case, this might be the correct moment to revisit the issue, now that we are leaning towards having surrounding parens.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnot

However, that doesn't seem like what you're asking for. Cache-Control maps to a dictionary;

Apologies. I should have left my comment where the change for the Dictionary is made.

if you allowed a dictionary member to be a parameterised item, what would that look like?

What I have in mind is something like Cache-Control: no-cache, mydirective arg1=a;arg2=b.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you're asking for there essentially is a Parameterised Dictionary. I'd do it as something like

Example: foo=1, bar=2;a=b;c=d

... but that's just a fairly minor syntactic difference. Could you open an issue for that?

@mnot mnot merged commit 4cff455 into master Jul 4, 2019
@mnot mnot deleted the mnot-816 branch July 4, 2019 07:49
@kazuho kazuho mentioned this pull request Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants