On Sun, 2009-09-20 at 23:05 +0200, mz8lenvp05gyb78 wrote:
> Hello everyone,
> 
> i got a problem with the HttpClient Component. I poll a website every 5 
> minutes to track the changes of it. But when it changes the reponse 
> string does not change. I'm using a class which implements the runnable 
> interface and use ScheduledThreadPoolExecutor for executing the thread 
> every specified time. I'm ignoring all cookies with a self written 
> CookieSpecFactory.
> 
> client = new DefaultHttpClient();
> ((DefaultHttpClient) 
> client).getCookieSpecs().register(IgnoringSpecFactory.IGNORE, new 
> IgnoringSpecFactory());
> client.getParams().setParameter("http.protocol.cookie-policy", 
> IgnoringSpecFactory.IGNORE);
> 
> Due a debug session i know:
> 
>     * The Runnable instance is the same at every pass.
>     * The HttpClient instnace is the same ar every pass.
> 
> The only problem is, that the content do not change, although the 
> website changes. The rest of the code in the run-Mehthod:
> 
> HttpGet get = new HttpGet(url);
> ResponseHandler<String> handle = new BasicResponseHandler();
> String response = client.execute(get, handle);
> client.getConnectionManager().closeExpiredConnections();
> 
> I'm looking forward for some hints.
> 
> Regards,
> Benjamin
> 

Benjamin,

HttpClient does not cache content. Please turn on the wire logging in
order to see the content of HTTP messages that get sent across the wire,
as described in this document:

http://hc.apache.org/httpcomponents-client/logging.html

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to