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=23839>.
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=23839

cookies aren't working?

           Summary: cookies aren't working?
           Product: Commons
           Version: 2.0 Beta 2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: HttpClient
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I'm trying to use HttpClient to recreate a request that I stored. Important for 
this request is that the cookies that were part of the original request, are 
present. 

The cookies are set, because the original cookie does not have a domain (null), 
and I get a warning "WARNING: Invalid cookie state: domain not specified".

But when I examine the resulting request there cookies are not present.

How comes?


                // add the cookies
                lHttpClient.getState().setCookiePolicy
(CookiePolicy.COMPATIBILITY);
                for (int i = 0; i < iCookies.size(); i++)
                {
                        javax.servlet.http.Cookie lCookie = 
(javax.servlet.http.Cookie)iCookies.get(i);
                        org.apache.commons.httpclient.Cookie lHttpCookie = new 
org.apache.commons.httpclient.Cookie(lCookie.getDomain(), lCookie.getName(), 
lCookie.getValue()); 
                        lHttpClient.getState().addCookie( lHttpCookie );
                }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to