glassfish
  1. glassfish
  2. GLASSFISH-13129

Session is null in request with URL containing jsessionid parameter

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: v3.0.1
    • Fix Version/s: 3.1.1_b01
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      If cookie support is disabled in the browser, then with the attached testcase,
      GlassFish does not return a session as expected.

      My apologies for not writing a more basic testcase.

      The failure manifests itself in a Wicket framework message "Page Expired" when
      clicking on the link "Go to Panel 2".

      When debugging the testcase, check WicketFilter.doGet(..) and WicketFilter line
      425 calling AbstractHttpSessionStore.getSessionId(...).
      AbstractHttpSessionStore.getSessionId(...) returns a null session directly from
      a request
      that has a URL containing the jsessionid parameter.

      The testcase runs normally with the Tomcat and Jetty servlet containers.

        Activity

        Hide
        oleksiys added a comment -

        we were able to reproduce the issue.
        it's reproducible, when URI looks like
        http://localhost:8080/a/;jsessionid=.....

        in this case Glassfish/Grizzly Mapper tries to find correct welcome resource for this URI, it tries
        http://localhost:8080/a/index.html,
        http://localhost:8080/a/index.htm,
        http://localhost:8080/a/index.jsp
        ...
        when attempting different options it removes the jsessionid information, so it gets corrupted.

        The easiest workaround is to provide specific resource (welcome file) in the original request, like
        http://localhost:8080/a/index.jsp;jsessionid=.....

        in this case it should work.

        Anyways we work on the fix.

        Show
        oleksiys added a comment - we were able to reproduce the issue. it's reproducible, when URI looks like http://localhost:8080/a/;jsessionid= ..... in this case Glassfish/Grizzly Mapper tries to find correct welcome resource for this URI, it tries http://localhost:8080/a/index.html , http://localhost:8080/a/index.htm , http://localhost:8080/a/index.jsp ... when attempting different options it removes the jsessionid information, so it gets corrupted. The easiest workaround is to provide specific resource (welcome file) in the original request, like http://localhost:8080/a/index.jsp;jsessionid= ..... in this case it should work. Anyways we work on the fix.
        Hide
        oleksiys added a comment -

        reassigning to Shing Wai, who's currently working on webcontainer side patch for this issue.

        Show
        oleksiys added a comment - reassigning to Shing Wai, who's currently working on webcontainer side patch for this issue.
        Hide
        Shing Wai Chan added a comment -

        I have put a fix in CoyoteAdapter.java

        Sending web-core/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java
        Transmitting file data .
        Committed revision 45709.

        Similar fix need to be applied to ContainerMapper.java.
        Assign to Olesksiys to fix that.

        Show
        Shing Wai Chan added a comment - I have put a fix in CoyoteAdapter.java Sending web-core/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java Transmitting file data . Committed revision 45709. Similar fix need to be applied to ContainerMapper.java. Assign to Olesksiys to fix that.
        Hide
        oleksiys added a comment -

        ContainerMapper is fixed

        Project: glassfish
        Repository: svn
        Revision: 45722
        Date: 2011-03-25 01:57:21 UTC

        Show
        oleksiys added a comment - ContainerMapper is fixed Project: glassfish Repository: svn Revision: 45722 Date: 2011-03-25 01:57:21 UTC
        Hide
        oleksiys added a comment -

        fixed on GF trunk.

        Show
        oleksiys added a comment - fixed on GF trunk.

          People

          • Assignee:
            oleksiys
            Reporter:
            bht
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: