Hi,
I'm sure this has got to be a FAQ for Restlet, so sorry in advance for
such a simple question...
I've got a restlet attached to an example URL like:
/example/{id}/
I want the library to return a 404 for URLs with anything trailing. Ie.
/example/{id}/foo
/example/{id}/whatever/xyz/blah...
How can I make the matching more "strict" and thus not accept the extra
path. I can do this manually per request by looking at the
request.getResourceRef().getRemainingPart(). But it's seems kind of
silly to have to do this on every request. Seems like it would be
better a part of the Router matching or something.
Thanks for any advice on this.
By the way, getRemainingPart() returns an empty string for a request to
/example/{id}/ I'm wondering if this shouldn't return NULL instead.
Related, getSegments() on the above returns: [example, $id, ] See the
extra item in the segment list?? Yuck.
Thanks,
Adam