Reserved characters in Sling suffix | Community
Skip to main content
o_neal
Level 2
October 29, 2018
Solved

Reserved characters in Sling suffix

  • October 29, 2018
  • 1 reply
  • 970 views

Greetings,

Recently was looking for approaches on how to pass cacheable (on Dispatcher / CDN tiers) parameters to Sling Servlets and the optimal solution seems to be usage of Sling suffixes.

There the following URI template comes up:

/bin/project/endpoint.json/parameter=value/parameter2=value2/.json

The approach seems to be good from the point of view of request readability; it is being properly parsed on the Sling level and cached on the Dispatcher tier.

However, I am a bit concerned about its compliance with the URI specification that says that '=' sing is a reserved symbol (RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax), whereas there is no such such term as 'suffix' in the URI specification.

Is there a chance that someone could shed a light on the subject whether such suffix format is allowed or not?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

The term "suffix" is just a naming used by sling, and from an HTTP perspective there is nothing special with these URLs. Also you can easily encode the "=" character in the url, it's being decoded transparently before the resolution.

And next to suffixes you can also use selectors.

Jörg

1 reply

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 29, 2018

The term "suffix" is just a naming used by sling, and from an HTTP perspective there is nothing special with these URLs. Also you can easily encode the "=" character in the url, it's being decoded transparently before the resolution.

And next to suffixes you can also use selectors.

Jörg