With the following code, getResponseHeader("Location") returns the redirect URL, but getRedirectURL() returns null.
HttpGet get = new HttpGet(url, false); // don't follow redirects
get.run();
log.info("response code: " + get.getResponseCode()); // 302
log.info("location: " + get.getResponseHeader("Location")); // url
log.info("location: " + get.getRedirectURL()); // null
With the following code,
getResponseHeader("Location")returns the redirect URL, butgetRedirectURL()returns null.