Paul Sandoz (via Nabble) wrote:
> It is not possible to decode before matching because you loose
> information. Matching must happen in encoded space. For example what
> if a path segment of the request URI has '/' characters that are
> percent encoded? e.g. if another URI is embedded in a path segment.
Good point. So I have two follow-up questions:
1) Do you decode the query/matrix arguments before passing it to the
user? I assume so.
2) Is it legal to use @Path against multiple path segments at once? Such
as @Path("first/second")
Are there any other possible conflicts or is the '/' character the only
one?
3) At the very least I would say that the @Path Javadoc should indicate
near the top that regular expression are run against the encoded URI.
The Javadoc for "value" is very "busy" so you would have to include this
very early on so people don't scan past it.
Thank you,
Gili
--
View this message in context: http://n2.nabble.com/Shouldn%27t-Jersey-decode-%40Path-before-matching-the-regex--tp2089825p2114310.html
Sent from the Jersey mailing list archive at Nabble.com.