method.getURI()

On 12/05/2008, Janos Mucsi <[EMAIL PROTECTED]> wrote:
> 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?

Have you tried calling

method.getURI()

after the executeMethod() has returned?

>  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
>
>
>

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

Reply via email to