You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Aleksandr Mashchenko (JIRA)" <ji...@apache.org> on 2016/01/12 21:12:42 UTC

[jira] [Updated] (WW-4585) Struts2 Rest plugin doesnt handle JSESSIONID

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

Aleksandr Mashchenko updated WW-4585:
-------------------------------------
    Description: 
If a url with a JSESSIONID is sent to a struts2 action, a failure will result

see this modified unit test from the plugin unit test:
{code:java}
    public void testGetJsessionIdSemicolonMapping() throws Exception {
        req.setRequestURI("/myapp/animals/dog/fido;jsessionid=29fefpv23do1g");
        req.setServletPath("/animals/dog/fido");
        req.setMethod("GET");

        ActionMapping mapping = mapper.getMapping(req, configManager);

        assertEquals("/animals", mapping.getNamespace());
        assertEquals("dog", mapping.getName());
        assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
        assertEquals("show", mapping.getMethod());
    }
{code}

  was:
If a url with a JSESSIONID is sent to a struts2 action, a failure will result

see this modified unit test from the plugin unit test:
    public void testGetJsessionIdSemicolonMapping() throws Exception {
        req.setRequestURI("/myapp/animals/dog/fido;jsessionid=29fefpv23do1g");
        req.setServletPath("/animals/dog/fido");
        req.setMethod("GET");

        ActionMapping mapping = mapper.getMapping(req, configManager);

        assertEquals("/animals", mapping.getNamespace());
        assertEquals("dog", mapping.getName());
        assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
        assertEquals("show", mapping.getMethod());
    }



> Struts2 Rest plugin doesnt handle JSESSIONID
> --------------------------------------------
>
>                 Key: WW-4585
>                 URL: https://issues.apache.org/jira/browse/WW-4585
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - REST
>    Affects Versions: 2.3.24
>         Environment: tomcat
>            Reporter: Rich P Peters, II
>            Priority: Blocker
>              Labels: newbie
>
> If a url with a JSESSIONID is sent to a struts2 action, a failure will result
> see this modified unit test from the plugin unit test:
> {code:java}
>     public void testGetJsessionIdSemicolonMapping() throws Exception {
>         req.setRequestURI("/myapp/animals/dog/fido;jsessionid=29fefpv23do1g");
>         req.setServletPath("/animals/dog/fido");
>         req.setMethod("GET");
>         ActionMapping mapping = mapper.getMapping(req, configManager);
>         assertEquals("/animals", mapping.getNamespace());
>         assertEquals("dog", mapping.getName());
>         assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
>         assertEquals("show", mapping.getMethod());
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)