hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janos Mucsi <janos.mu...@macys.com>
Subject detecting real redirects with GetMethod
Date Mon, 12 May 2008 22:00:42 GMT
Hi

I am following redirects like this

HttpClient client = new HttpClient();
GetMethod method = new GetMethod("http://....";
method.setFollowRedirects(true);
client.executeMethod(method);

I would like to compare the new URL to the old URL in case of redirects. 
What is the most efficient way
to do this if I do not want to make two separate connections?

In my case this is necessary because the company I am working for uses 
redirects just to change cookies,
so I need to distinguish between real redirects (when the URL is 
different) and fake redirects (when cookies
are different only).

Thanks.

-- 
Janos Mucsi



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message