W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2022

Clarification on RFC6570

From: Darrel Miller <Darrel.Miller@microsoft.com>
Date: Fri, 4 Mar 2022 21:02:15 +0000
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <DM6PR00MB06660CB583D27836EFC5843BF0059@DM6PR00MB0666.namprd00.prod.outlook.com>
Hey folks,

Iíve run into an issue with URI Templates and the use of the single quote character and am looking for some clarification

RFC 6570 says:

2.1.  Literals

   The characters outside of expressions in a URI Template string are
   intended to be copied literally to the URI reference if the character
   is allowed in a URI (reserved / unreserved / pct-encoded) or, if not
   allowed, copied to the URI reference as the sequence of pct-encoded
   triplets corresponding to that character's encoding in UTF-8

     literals      =  %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B
                   /  %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
                   /  pct-encoded
                        ; any Unicode character except: CTL, SP,
                        ;  DQUOTE, "'", "%" (aside from pct-encoded),
                        ;  "<", ">", "\", "^", "`", "{", "|", "}"


The literals syntax intentionally excludes the single quote.  However, single quote is listed as a reserved character in RFC 3986 https://datatracker.ietf.org/doc/html/rfc3986/#section-2.2

Looking further into RFC6570 in section 3.1 it says

   If the literal character is allowed anywhere in the URI syntax
   (unreserved / reserved / pct-encoded ), then it is copied directly to
   the result string.

This seems to be a contradiction.  According to the literal ABNF, single quote is not allowed in a literal. According to the text, it should be.

Am I misreading something?


Received on Friday, 4 March 2022 21:05:28 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 2 February 2023 18:44:07 UTC