Subject: [art] Question regarding RFC 6570

From: Peter Occil <[email-masked]>
Date: Thu, 2 Aug 2018 00:19:31 -0400

(Sorry, I meant to send this message to the ART mailing list.)

It seems that the URI Templates document (RFC 6570) doesn't sufficiently clarify the behavior with variable values with well-formed pct-encoded components.

Take the following variable names and their values:

  pctat2 := "a%42"
  pctat3 := "ab%43"
  pctat0 := "%42ab"

For the purpose of variable expansion, are valid pct-encoded components in the variable value first decoded before appending the string?  (The only example in the document with "%", "half", included an ill-formed pct-encoded component.) And given the definitions above, how are the following templates expanded?

  {pctat2}

  {pctat2:2}

  {pctat2:3}

  {pctat2:4}

  {pctat3:3}

  {pctat3:4}

  {pctat0:1}

  {pctat0:2}

  {pctat0:3}

(For example, is the first template given expanded to "aB" or "a%42"?  Is the second template expanded to "a", "aB", "a%42", "a%", or something else?)

---

From: Peter Occil <[email-masked]>
Date: Thu, 2 Aug 2018 00:27:43 -0400

Strike out the following text:

   Is the second template expanded to "a", "aB", "a%42", "a%", or something else?

And insert:

   Is the second template expanded to "a", "aB", "a%42", "a%25", or something else?

From: Peter Occil
Sent: Thursday, August 2, 2018 12:19 AM
To: [email-masked]
Cc: [email-masked]
Subject: Question regarding RFC 6570

  pctat2 := "a%42"
  pctat3 := "ab%43"
  pctat0 := "%42ab"

  {pctat2}

  {pctat2:2}

  {pctat2:3}

  {pctat2:4}

  {pctat3:3}

  {pctat3:4}

  {pctat0:1}

  {pctat0:2}

  {pctat0:3}