retrofit relaxed algorithms

Hi there,

I'm still struggling somehow with what exactly the "retrofit" spec is
useful for, unless we exactly specify the "relaxed" algorithms.

To pick an example:

> String quoting:
>     Section 5.6.4 of [HTTP] allows backslash-escaping most characters in quoted strings, whereas Structured Field Strings only escape "\" and DQUOTE. Compatibility can be improved by unescaping other characters before parsing.

The problem that I see here - and this applies to many other parts of
this section: you can't unescape "before parsing". To get to the point
where you know what an escape is, you already have done some kind of
parsing (at least you should). So we really really need to write down
that algorithm.

Now, for quoted-string, it would be good to understand how frequent
escaping of characters other than DQUOTE and '\' is. Is it a rare edge
case? In which case it might be better to ignore it.

However, once we decide it's common enough to need a workaround, we have
- for all practical purposes - changed sf-string itself. Right now,
sf-string theoretically has an extension point (new '\' escape sequences
that would currently cause a parse error). In practice, that extension
point would be taken away by that workaround, in which case I would
argue we should just relax sf-string to be the same thing as quoted-string.

One less toggle to worry about (any yes, we could restrict that to parsing).

Same considerations would apply to optional whitespace etc.

Best regards, Julian

Received on Tuesday, 6 December 2022 09:42:27 UTC