-
Notifications
You must be signed in to change notification settings - Fork 139
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
Conversation
key = lcalpha *( lcalpha / DIGIT / "_" / "-" ) | ||
lcalpha = %x61-7A ; a-z | ||
sh-list = list-member *( OWS "," OWS list-member ) | ||
list-member = sh-item / inner-list |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
There was a problem hiding this comment.
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?
Proposal for #816.