#1606: Targeted CC parsing

<https://github.com/httpwg/http-extensions/issues/1606>

Right now, parsing of targeted Cache-Control is specified like this:

> Targeted fields MAY be parsed as a Dictionary Structured Field [RFC8941], and implementations are encouraged to use a parser for that format in the interests of robustness, interoperability and security. [...] However, implementers MAY reuse a Cache-Control parser for simplicity.

The idea here is that while we'd like the interop benefits of SF, we recognise that some -- perhaps many -- implementers will have a strong motivation to reuse their Cache-Control parsers.

This seems like it might be the worst of both worlds, in that we now have two possible implementation strategies. Given that there are several SF implementations now,[1]  I wonder whether should reconsider this. E.g.,

1) Strengthen the first MAY to a SHOULD, making the field sf-first, or even
2) Require SF, don't allow reuse of CC parsers

Thoughts?

Cheers,


1. partial list at <https://github.com/httpwg/wiki/wiki/Structured-Fields>

--
Mark Nottingham   https://www.mnot.net/

Received on Friday, 27 August 2021 02:14:14 UTC