You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Mike Rheinheimer (JIRA)" <ji...@apache.org> on 2009/07/14 21:27:14 UTC

[jira] Updated: (WINK-96) proposal: enhance search for matched resources by decoding URI

     [ https://issues.apache.org/jira/browse/WINK-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Rheinheimer updated WINK-96:
---------------------------------

    Attachment: WINK-96.patch

Patch can be applied at wink-server

> proposal:  enhance search for matched resources by decoding URI
> ---------------------------------------------------------------
>
>                 Key: WINK-96
>                 URL: https://issues.apache.org/jira/browse/WINK-96
>             Project: Wink
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.1
>            Reporter: Mike Rheinheimer
>             Fix For: 0.1
>
>         Attachments: WINK-96.patch
>
>
> The current "search" for matching root resources in FindRootResourceHandler.handleRequest does not take into account an encoded URL path.  I wasn't sure where or how to test for this.  There is already a test at UriInfoImplTest.testUriInfo that has an encoded URI path segment, but I think the MockRequestConstructor or MockHttpServletRequest is already decoding it prior to sending it.  See attached patch for the proposed fix.  I could use a little pointer as to where to put the test in the unittests.
> I have a test for this in a forthcoming integration test Jira.  It looks something like this:
>         HttpClient client = new HttpClient();
>         GetMethod getMethod = new GetMethod(getBaseURI()
>                 + "/%75riinfo");
>         client.executeMethod(getMethod);
>         assertEquals(200, getMethod.getStatusCode());
> Without the attached patch fix, I get a 404.  With the attached patch, this test passes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.