URI template variable specifications are ignored:
https://jsr311.dev.java.net/nonav/releases/1.0/spec/
spec3.html#x3-370003.7.3
The reason is that a regex parser would be required to support such
contextual encoding of regex expressions and that is not an
significant thing to implement or reuse.
Paul.
On Dec 29, 2008, at 7:53 PM, Gili wrote:
>
> Say I want to match the following path: "http://example.com/a b"
>
> @Path("{tag:a b}") fails but
> @Path("{tag:a%20b}") works
>
> This is a problem because it means I can't use \\s in the regular
> expression, allowing me to match arbitrary whitespace. Shouldn't
> Jersey be
> decoding the path before running the regex against it?
>
> According to the specification page 12: "The value of the annotation
> is
> automatically encoded" page 34 "Encoded: Disables automatic URI
> decoding for
> path, query, form
> and matrix parameters" which implies that URI decoding should be
> taking
> place.
>
> Gili
> --
> View this message in context: http://n2.nabble.com/Shouldn%27t-Jersey-decode-%40Path-before-matching-the-regex--tp2089825p2089825.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>