On Thu, 2012-05-03 at 13:37 -0400, Chris Krahe wrote: > Perhaps I'm lazy, but I'm wondering if there's a way (or could be a way) to > attach a listener to the HttpClient such that all redirects are first > passed to the listener before they're submitted. The listener would have > the opportunity to inspect the proposed request (e.g. GET) and, if desired, > reject it. > > I'll state the obvious: > > 1. This sounds like the job of a forward proxy > 2. Alternatively, the code could disable automatic redirects and handle > them itself > > But like I said, perhaps I'm lazy. Configuring a forward proxy, like > Squid, is non-trivial. Handling redirects manually is non-trivial. > > Thoughts? > Chris
What is wrong with the RedirectStrategy? http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/RedirectStrategy.html Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
