users@jersey.java.net

Matrix Parameter With URL Value Ends Up With 404

From: Hien Luu <hluu_at_yahoo.com>
Date: Thu, 18 Oct 2007 14:51:13 -0700 (PDT)

Hi,

I have a resource class that takes a matrix parameter and the value is a URL like 'http://www.yahoo.com'. Obviously the URL is URL encoded on the client side before making a GET request.

This is what it looks like on the client side:
http://localhost:8080/myresource;url=http%3A%2F%2Fwww.yahoo.com>

When the above request URL gets to the server side, it will look something like this:
http://localhost:8080/myresource;url=http://www.yahoo.com

The WebApplicationImpl.stripMatrixParams() method doesn't seem to parse the above URL correctly.

For example if the input to the method stripMatrixParams() is '/myresource;url=http://www.yahoo.com', the output is
'/myresource//www.yahoo.com'. Because of this the RootResourceClass.dispatch() method will not able to find a UriTemplateDispatcher and ends up being a 404 response.

Has anyone encounter this problem before?

Thanks,

Hien