Clarification on RFC6570

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

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