hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: How to not follow redirects?
Date Sun, 22 Feb 2009 16:11:19 GMT
Scott Mueller wrote:
> I need to know the redirect location of a post and I don't want to follow
> redirects (which it is currently doing by default).  How should this be
> handled?  I'm looking at the Javadocs and see a
> DefaultHttpClient.setRedirectHandler() method that takes a RedirectHandler.
> Should I pass in DefaultRedirectHandler overriding its
> isRedirectRequested(response, context) method and passing back false
> always?  Doing that doesn't sound right as a redirect might be requested,
> but I just don't want to follow it...
> 

Set 'http.protocol.handle-redirects' parameter to false

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message