Hello Jeff Lee,

> I'm writing an application that downloads files, and I need to disable the
> automatic following of HTTP redirects.
> Does that mean that, to download my files, I have to use GetMethod instead
> of HttpConnection.getResponseInputStream() ?
> 
> More specifically:
> 
> Class HttpMethodBase has a method named setFollowRedirects(boolean), which
> can be used to "turn off" the automatic following of HTTP redirects.
> 
> However, if I use HttpConnection.getResponseInputStream(), there doesn't
> appear to be a corresponding way to turn off automatic HTTP redirection.
> 
> Or am I missing something?

You are missing that the redirect logic is not in the connection.
If you use HttpConnection directly, it is your responsibility to
handle redirects. In fact, it is your responsibility to handle everything.
I have no idea why you would try to do that in the first place.

Only if you execute HttpMethods through the HttpClient, you will have
automatic redirect handling. And in that case, you can set the flag in
the method to disable it.

hope that helps,
  Roland

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

Reply via email to