hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: question about HttpState
Date Mon, 25 Aug 2003 23:30:19 GMT
Hi Yue,

Just a few additions to what Adrian posted.

On Monday, August 25, 2003, at 12:27 PM, Yue Luo wrote:
> 2. Do HttpState.addCookies() and HttpState.getCookies() create COPIES 
> of the cookies or work on the cookie objects directly?

HttpState uses the instances of Cookie that it is given.  No copies are 

> 3. This question is somewhat related to the above one.
> client.executeMethod(method1);
> Cookies[] cookie1=state.getState().getCooies();
> client.executeMethod(method2);
> Cookies[] cookie2=state.getState().getCooies();
> If the server changes some cookies in the second method, will the 
> cookie objects in cookie1[] be changed?

Yes, any changes to HttpState, including cookies, will be seen by all 
of the methods using it.


View raw message