boolean areFollowingRedirect = pAreFollowingRedirect; HTTPSampleResult res = pRes; if (!areFollowingRedirect && res.isRedirect()) { if(log.isDebugEnabled()) { log.debug("Location set to - " + res.getRedirectLocation());
if (res.isRedirect()) { res.setRedirectLocation(conn.getHeaderField(HTTPConstants.HEADER_LOCATION));
res.setSuccessful(isSuccessCode(statusCode)); res.setResponseHeaders(getResponseHeaders(httpResponse)); if (res.isRedirect()) { final Header headerLocation = httpResponse.getLastHeader(HTTPConstants.HEADER_LOCATION); if (headerLocation == null) { // HTTP protocol violation, but avoids NPE
if (httpSampleResult.isRedirect()) { // Save Location so resulting sample can be disabled if (LAST_REDIRECT == null) { sampler.setComment("Detected the start of a redirect chain");
if (!lastRes.isRedirect()) { break;