Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11842

(7.1.0) UNDERTOW-1111 Undertow does not respect javax.servlet.SessionCookieConfig#getMaxAge contract

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.ER2
    • None
    • Undertow
    • None

      javax.servlet.SessionCookieConfig#getMaxAge states that by default -1 should be returned:

      Gets the lifetime (in seconds) of the session tracking cookies created on behalf of the application represented by the ServletContext from which this SessionCookieConfig was acquired.
      By default, -1 is returned.

      Source

      Undertow does not respect this since its javax.servlet.SessionCookieConfig implementation, SessionCookieConfigImpl, delegates to Undertow's io.undertow.server.session.SessionCookieConfig which defaults the maxAge attribute to zero.

      We have recently implemented the ability to configure Spring Session's session cookie using SessionCookieConfig and this causes problems for Undertow users since we rely on -1 to indicate the default value, as defined by Servlet API spec.

            sdouglas1@redhat.com Stuart Douglas
            thofman Tomas Hofman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: