hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Köhler <skoeh...@upb.de>
Subject Re: Cookies, Chunked-Post & Threads
Date Wed, 12 Nov 2003 14:02:26 GMT
> HttpClient.executeMethod
>    (HostConfiguration, HttpMethod, HttpState)
> 
> If you have used the same client from different
> threads without specifying different states, that
> might be a problem.

Well, i use this method now from different thread with different 
HttpStates. I'd like to use even one HttpState-Object from different 
threads! Is that possible. I'm doing that right now, but i'm not sure if 
  the HttpClient-APIs cares about that case.

If not, that would be very easy:

synchronized (state)
{
   //get cookie headers
}

//execute HTTP-request

synchronized (state)
{
   //put cookie header
}



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message