I was wrong a fortnight ago when I though any sensible @Path value with encode=false could be re-written with encode=true.
A @Path value does need encode=false when it includes:
* a %-escaped <reserved> character (eg a ‘/’ that is NOT a path segment separator); or
* a %-escaped ‘{‘ or ‘}’ (so it is not misinterpreted as a {name} placeholder).
Example: @Path(value=”/math/pi=22%2F7”, encode=false)
When encode=true I assume ‘?’, ‘#’ and ‘%’ characters in a @Path value are encoded (as %3F, %23 and %25) as they are not allowed (alone) in a path, despite being “valid URI characters”. Instead of talking about “valid URI characters”, the Path#encode javadoc could say:
“If true, any percent characters or characters that are not valid in a URI path will be automatically encoded.”
James Manger