hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16505] New: - CookieSpec.formatCookie(Cookie) produces an incorrect cookie header value
Date Tue, 28 Jan 2003 18:41:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16505>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16505

CookieSpec.formatCookie(Cookie) produces an incorrect cookie header value

           Summary: CookieSpec.formatCookie(Cookie) produces an incorrect
                    cookie header value
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-httpclient-dev@jakarta.apache.org
        ReportedBy: Ryan.Lubke@Sun.COM


Consider the following:
----------------------------------------------------------------------
Cookie cookie = new Cookie(".foo.com", "name", "value");
cookie.setVersion(1);
cookie.setPath("/");
CookieSpec spec = CookiePolicy.getSpecByPolicy(CookiePolicy.RFC2109);
System.out.println(spec.formatCookie(cookie));                
----------------------------------------------------------------------

When calling CookieSpec.formatCookie(Cookie) the resulting output is:

   name="value"

The Version attribute is not present as required by RFC2109, nor is the path or
domain information included.

It seems that in this case, only Cookie type 0 output is produced.

Mime
View raw message