incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hasan Hasan <ha...@trialox.org>
Subject some consequences of resolution of CLEREZZA-560
Date Tue, 16 Aug 2011 14:18:05 GMT
Dear All

The resolution of https://issues.apache.org/jira/browse/CLEREZZA-560
comes with a consequence that certain ways of breaking a URL path into
sections do not work anymore
e.g.,
@Path("bar/foo.{extension:(pdf|csv)}")

will not work since triaxrs requires that the character immediately
following a path section must be "/" if any.
The above example produces path sections "bar/foo." and
"{extension:(pdf|csv)}".
Thus, if your URL looks as follows: "bar/foo.pdf", this URL won't match that
specified Path,
because the character after "bar/foo." is not "/" but "p".

Resolution of CLEREZZA-560 is needed to not match resource class annotated
with @Path("prefix")
to a URL starting with "prefixwithotherstuff/...."

As a workaround for the desired effect in the example above, you can use
@Path("bar/{filename:foo.(pdf|csv)}")

and then extract the extension part from the filename parameter

Regards
Hasan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message