Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8351983

HttpCookie Parser Incorrectly Handles Cookies with Expires Attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 8, 11, 17, 21, 23, 24, 25
    • core-libs
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      The HttpCookie.parse() method incorrectly forces any cookie containing an "expires" attribute to be parsed using Netscape cookie rules (version 0), even when the cookie explicitly contains "max-age" attribute as specified in RFC 2109/2965.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      HttpCookie.parse("Set-Cookie: name=value; expires=Thu, 01 Jan 2026 00:00:00 GMT; max-age=360000");

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      max-age = 360000
      ACTUAL -
      max-age overrided by expires

            michaelm Michael McMahon
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: