"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

DefaultRedirectStrategy.java  (httpcomponents-client-4.5.6-src):DefaultRedirectStrategy.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 229 skipping to change at line 229
final HttpResponse response, final HttpResponse response,
final HttpContext context) throws ProtocolException { final HttpContext context) throws ProtocolException {
final URI uri = getLocationURI(request, response, context); final URI uri = getLocationURI(request, response, context);
final String method = request.getRequestLine().getMethod(); final String method = request.getRequestLine().getMethod();
if (method.equalsIgnoreCase(HttpHead.METHOD_NAME)) { if (method.equalsIgnoreCase(HttpHead.METHOD_NAME)) {
return new HttpHead(uri); return new HttpHead(uri);
} else if (method.equalsIgnoreCase(HttpGet.METHOD_NAME)) { } else if (method.equalsIgnoreCase(HttpGet.METHOD_NAME)) {
return new HttpGet(uri); return new HttpGet(uri);
} else { } else {
final int status = response.getStatusLine().getStatusCode(); final int status = response.getStatusLine().getStatusCode();
if (status == HttpStatus.SC_TEMPORARY_REDIRECT) { return status == HttpStatus.SC_TEMPORARY_REDIRECT
return RequestBuilder.copy(request).setUri(uri).build(); ? RequestBuilder.copy(request).setUri(uri).build()
} else { : new HttpGet(uri);
return new HttpGet(uri);
}
} }
} }
} }
 End of changes. 1 change blocks. 
5 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)