http-extensions icon indicating copy to clipboard operation
http-extensions copied to clipboard

Fix #1399 - Add a grammar corresponding to the parsing algorithm

Open recvfrom opened this issue 4 years ago • 2 comments

This PR add a grammar that corresponds to the algorithm parsing section.

A grammar currently exists in section 4.4.1 but it's much stricter than what user agents actually enforce, and there have been several instances where that grammar was assumed to correspond with the cookie parsing algorithm defined in section 5. By having a separate grammar in section 5, hopefully we can reduce confusion while also preserving the high-level view that a grammar provides.

I'm not sure whether it's worth keeping around the existing grammar in section 4.4.1, but in this initial work I have not attempted to remove it.

CC @sbingler and @miketaylr

recvfrom avatar Oct 19 '21 03:10 recvfrom

I'm not sure whether it's worth keeping around the existing grammar in section 4.4.1, but in this initial work I have not attempted to remove it.

4.4.1 defines the behavior for a well behaved server, while your addition defines what UAs must accept to be compatible with the real world (and misbehaving servers). I think 4.4.1 still serves a useful purpose and I think we should keep it.

sbingler avatar Oct 19 '21 21:10 sbingler

I believe I've address all feedback with the most recent commit, but please let me know if I missed anything.

recvfrom avatar Oct 20 '21 22:10 recvfrom