#333 getPathInfo does not decode request URL

closed-fixed
None
5
2008-03-31
2005-10-10
No

The servlet 2.4 api says HttpServletRequest.getPathInfo
return a string "decoded by the web container ". But
HttpUnit's HttpServletRequest implementation does not
do so.

Repro: set up a test like so (any servlet class will do):

ServletRunner runner = new ServletRunner();
runner.registerServlet("repository/*",
MyServlet.class.getName());

ServletUnitClient client = runner.newClient();

client.setExceptionsThrownOnErrorStatus(false);

WebRequest request = new GetMethodWebRequest(
"http://localhost/repository/Default%20Repository");

WebResponse response;
response = client.getResponse(request);

In the servlet, request.getPathInfo will return a
strung containing the undecoded '%20'.

Discussion

  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-31
    • assigned_to: nobody --> wolfgang_fahl
    • status: open --> closed-fixed
     
  • Wolfgang Fahl

    Wolfgang Fahl - 2008-03-31

    Logged In: YES
    user_id=1220573
    Originator: NO

    The change is now in cvs and will be in the next build

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks