You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/04/24 21:56:33 UTC
svn commit: r1792553 -
/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
Author: ggregory
Date: Mon Apr 24 21:56:33 2017
New Revision: 1792553
URL: http://svn.apache.org/viewvc?rev=1792553&view=rev
Log:
Camel-case lvar name.
Modified:
httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java?rev=1792553&r1=1792552&r2=1792553&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java (original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java Mon Apr 24 21:56:33 2017
@@ -70,8 +70,8 @@ public class RequestTargetHost implement
}
if (!request.containsHeader(HTTP.TARGET_HOST)) {
- HttpHost targethost = coreContext.getTargetHost();
- if (targethost == null) {
+ HttpHost targetHost = coreContext.getTargetHost();
+ if (targetHost == null) {
final HttpConnection conn = coreContext.getConnection();
if (conn instanceof HttpInetConnection) {
// Populate the context with a default HTTP host based on the
@@ -79,17 +79,17 @@ public class RequestTargetHost implement
final InetAddress address = ((HttpInetConnection) conn).getRemoteAddress();
final int port = ((HttpInetConnection) conn).getRemotePort();
if (address != null) {
- targethost = new HttpHost(address.getHostName(), port);
+ targetHost = new HttpHost(address.getHostName(), port);
}
}
- if (targethost == null) {
+ if (targetHost == null) {
if (ver.lessEquals(HttpVersion.HTTP_1_0)) {
return;
}
throw new ProtocolException("Target host missing");
}
}
- request.addHeader(HTTP.TARGET_HOST, targethost.toHostString());
+ request.addHeader(HTTP.TARGET_HOST, targetHost.toHostString());
}
}