"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ProtocolExec.java" between
httpcomponents-client-5.1.1-src.tar.gz and httpcomponents-client-5.1.2-src.tar.gz

About: Apache HttpComponents Client provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. Java sources.

ProtocolExec.java  (httpcomponents-client-5.1.1-src):ProtocolExec.java  (httpcomponents-client-5.1.2-src)
skipping to change at line 182 skipping to change at line 182
authenticator.addAuthResponse(proxy, ChallengeType.PROXY, re quest, proxyAuthExchange, context); authenticator.addAuthResponse(proxy, ChallengeType.PROXY, re quest, proxyAuthExchange, context);
} }
final ClassicHttpResponse response = chain.proceed(request, scop e); final ClassicHttpResponse response = chain.proceed(request, scop e);
context.setAttribute(HttpCoreContext.HTTP_RESPONSE, response); context.setAttribute(HttpCoreContext.HTTP_RESPONSE, response);
httpProcessor.process(response, response.getEntity(), context); httpProcessor.process(response, response.getEntity(), context);
if (Method.TRACE.isSame(request.getMethod())) { if (Method.TRACE.isSame(request.getMethod())) {
// Do not perform authentication for TRACE request // Do not perform authentication for TRACE request
ResponseEntityProxy.enhance(response, execRuntime);
return response; return response;
} }
final HttpEntity requestEntity = request.getEntity(); final HttpEntity requestEntity = request.getEntity();
if (requestEntity != null && !requestEntity.isRepeatable()) { if (requestEntity != null && !requestEntity.isRepeatable()) {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("{} Cannot retry non-repeatable request", exch angeId); LOG.debug("{} Cannot retry non-repeatable request", exch angeId);
} }
ResponseEntityProxy.enhance(response, execRuntime);
return response; return response;
} }
if (needAuthentication(targetAuthExchange, proxyAuthExchange, ro ute, request, response, context)) { if (needAuthentication(targetAuthExchange, proxyAuthExchange, ro ute, request, response, context)) {
// Make sure the response body is fully consumed, if present // Make sure the response body is fully consumed, if present
final HttpEntity responseEntity = response.getEntity(); final HttpEntity responseEntity = response.getEntity();
if (execRuntime.isConnectionReusable()) { if (execRuntime.isConnectionReusable()) {
EntityUtils.consume(responseEntity); EntityUtils.consume(responseEntity);
} else { } else {
execRuntime.disconnectEndpoint(); execRuntime.disconnectEndpoint();
if (proxyAuthExchange.getState() == AuthExchange.State.S UCCESS if (proxyAuthExchange.getState() == AuthExchange.State.S UCCESS
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

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