httpwg / admin

When you want to speak to the manager.
9 stars 15 forks source link

Field name and value #54

Open MikeBishop opened 11 months ago

MikeBishop commented 11 months ago

We explicitly say not to \ / ` field names on reference. Do we want that enclosure when we're explicitly citing a field name and value pair? That is:

...by sending a Vary: Client-Cert response header.

or

...by sending a "Vary: Client-Cert" response header.

or

...by sending a Vary: Client-Cert response header.

I'm inclined to think that quotes are the most clear, since they appear in the text output, but ignoring text output my preference would be for \

mnot commented 11 months ago

Yeah, in a perfect world, we'd use tt, but the text output is not great. Personally, I'd lean towards quotes, although that may result in some confusing constructs (eg if the field value ends in quotes, or contains lots of them).

MikeBishop commented 11 months ago

From a cursory search of the RFC 911X documents, it appears that full fields (name + value) are usually set out as an illustration similar to http-message objects. The exception I've found so far was:

Because the meaning of "Pragma: no-cache" in responses was never specified, it does not provide a reliable replacement for "Cache-Control: no-cache" in them.

So obviously we went quotes there. Perhaps something like this....

When referring to a full field, i.e. a name and value together, the reference can be inlined or set apart as an illustration. When set apart, see Example Messages below. When inlined, the full field should be surrounded by quotes. If the field value includes quotes, it's preferable to use the illustration formatting. If inlining can't be avoided, use single quotes.

mnot commented 11 months ago

That seems like a reasonable rule of thumb: examples should generally be in http-message sections, unless they're so simplie that they're unambiguous in quotes.