Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4585

Struts2 Rest plugin doesn't handle JSESSIONID with DMI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.3.24
    • 2.3.28, 2.5
    • Plugin - REST
    • None
    • tomcat

    Description

      If a url with DMI and 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 testGetJsessionIdSemicolonMappingWithMethod() throws Exception {
              req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g");
              req.setServletPath("/animals/dog/fido");
              req.setMethod("GET");
      
              mapper.setAllowDynamicMethodCalls("true");
      
              ActionMapping mapping = mapper.getMapping(req, configManager);
      
              assertEquals("/animals", mapping.getNamespace());
              assertEquals("dog", mapping.getName());
              assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
              assertEquals("update", mapping.getMethod());
          }
      

      Attachments

        1. RestActionMapper.java
          17 kB
          Rich Peters

        Activity

          People

            aleksandr-m Aleksandr Mashchenko
            rpii Rich Peters
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: