private void setupClient(final AbstractHttpClient client) {
		this.client.addResponseInterceptor(new HttpResponseInterceptor() {
			@Override
			public void process(final HttpResponse response, final HttpContext context)
					throws HttpException, IOException {
				Header header = response.getFirstHeader("Location");
				if (header!=null)
					context.setAttribute("Location", header.getValue());
			}
		});
	}
private void setupClient ( final AbstractHttpClient client ) { this . client . addResponseInterceptor ( new HttpResponseInterceptor ( ) { @ Override public void process ( final HttpResponse response , final HttpContext context ) throws HttpException , IOException { Header header = response . getFirstHeader ( "Location" ) ; if ( header != null ) context . setAttribute ( "Location" , header . getValue ( ) ) ; } } ) ; }
This method is used to capture Location headers after HttpClient redirect handling.