Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-96

proposal: enhance search for matched resources by decoding URI

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1
    • 0.1
    • Server
    • None
    • Patch Available

    Description

      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.

      Attachments

        1. WINK-96.patch
          1 kB
          Michael Rheinheimer

        Issue Links

          Activity

            People

              martins Martin Snitkovsky
              rott Michael Rheinheimer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment