Re: Handling of redirections

I see. I guess I was just using the wrong API (I was using HTTPManager).
So if I had a URL hanging around what would be the best/easiest way to
get that URL and have redirection done automatically? Perhaps, another
way of phrasing the question is: how can I get access to the
HttpURLConnection API? Its constructor isn't public, so I assume that
there is some other, public, way to make use of it.

-Mark

Anselm Baird_Smith wrote:

> Mark Friedman writes:
>  > Looking at the HttpManager and HttpURLConnection, it seems that
>  > redirection is not automatically handled by the HTTP client code
> (except
>  > to reset the request's URL). Is that true? If so, it would be nice
> if
>  > there could be an option to runRequest() to have it follow the
>  > redirections.
>
> runRequest is meant to be "as stupi as possible" leaving any
> cleverness to uppper layers (ie HttpURLConnection does the redirection
>
> - when you use it through the URLConnection API)
>
> Note that this is not entirely true when filters are used (ie the
> AUthFilter will retry the request behind the runRequest'caller back)
>
> Anselm

Received on Saturday, 24 May 1997 13:03:22 UTC