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
[SH] use RWS in inner-list #983
Conversation
* update ABNF for inner-list to use RWS * update parsing algorithm to accept HTAB * update imports to include RWS and HTAB For httpwg#961
RWS implies "required". Is that really the intent? |
Yes. We require spaces between the items in an inner-list, otherwise they can abut. |
imho RWS and TABs make things error-prone and difficult to debug. |
Just so we're aware, this PR was to address an issue identified in #961 where the ABNF says So changing the ABNF to match the algorithm gives:
Alternatively, by extending the algorithm to also accept a htab immediately after an item (this PR), the ABNF becomes:
An alternative is to remove the htab altogether, which removes OWS, so we're left with:
Which is fine by me, but removing all OWS is a bigger change. |
I think we should retain the use of OWS, rather than removing them or changing (some of) them to RWS. Not all SH header fields would be generated by a serializer that understands SH. Rather, I'd assume that most of SH header fields would be written by hand, or generated by concatenating strings (in various programming languages). I do not think we can easily enforce everyone to insert whitespaces is a particular way (or drop them). |
@kazuho I'm not as worried about that; tabs in existing headers are extremely uncommon, IME (looking at things like the HTTP Archive dump). If SH implementations are consistent (and they should be if we test well), this will get caught early. |
@mnot I'm not worried about tabs. I think it would be fine if the change is going to be either or both of the following and nothing more.
|
@kazuho yep +1 |
I made a new branch (with PR) to see what sort of change is involved replacing |
OBE |
For #961