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

HttpCookie.parse method can't parese cookie header correctly when white space between attributes.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • core-libs
    • None
    • beta
    • sparc
    • solaris_10
    • Verified

      When calling HttpCookie.parse method to parse cookie header ,it can't parse it correctly when there
      is white space between each attributes.

      ###@###.### 2005-05-30 06:45:50 GMT

      Please see the below test case:
      Set-Cookie2:Customer="dtftest";Discard; Secure; Domain=".sun.com"; Max-Age="100"
      ;Version="1"; path="/www"; Port="80"
      testCons02:Exception thrown, not the expected : Fail
      Set-Cookie2:Customer="dtftest";Discard;Secure;domain="sun.com";Max-Age="100";Ver
      sion="1";path="/www";Port="80",Part="number_1"; Version="1";path="/";
      Set-Cookie2:Customer = "dtftest"; Discard; Secure; Domain ="sun.com"; Max-Age= "
      100"; Version = "1";
      testCons02:Exception thrown, not the expected : Fail
      Set-Cookie2:Customer = dtftest; Discard; Secure; Domain =sun.com; Max-Age= 100;
      Version = 1;
      testCons02:Exception thrown, not the expected : Fail
      Customer="dtftest";Discard;Secure;Domain="sun.com"; Max-Age="100";Version="1";pa
      th="/www";Port="80";
      testCons02:Exception thrown, not the expected : Fail
      Set-Cookie2:Customer=dtftest;Discard; Secure; Domain=sun.com; Max-Age=100;Versio
      n=1; path=/www;Port=80;
      testCons02:Exception thrown, not the expected : Fail

      ###@###.### 2005-05-30 08:17:09 GMT

            yuwangsunw Yujiang Wang (Inactive)
            jgaosunw Judy Gao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: