You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/11/25 09:55:23 UTC
httpcomponents-client git commit: Changed test case failing in
TravisCI due to what might be a local host name resolution problem
Repository: httpcomponents-client
Updated Branches:
refs/heads/master 8f8efa9d6 -> e89bbbbb4
Changed test case failing in TravisCI due to what might be a local host name resolution problem
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/e89bbbbb
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/e89bbbbb
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/e89bbbbb
Branch: refs/heads/master
Commit: e89bbbbb44616c5c067e2bedce785f8dda708d3b
Parents: 8f8efa9
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Nov 25 10:52:23 2017 +0100
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Nov 25 10:52:23 2017 +0100
----------------------------------------------------------------------
.../apache/hc/client5/testing/sync/TestClientAuthentication.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e89bbbbb/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java
index e038770..495eee6 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java
@@ -451,10 +451,9 @@ public class TestClientAuthentication extends LocalServerTestBase {
final HttpContext context) throws HttpException, IOException {
final EndpointDetails endpoint = (EndpointDetails) context.getAttribute(HttpCoreContext.CONNECTION_ENDPOINT);
final InetSocketAddress socketAddress = (InetSocketAddress) endpoint.getLocalAddress();
- final String localhost = socketAddress.getHostName();
final int port = socketAddress.getPort();
response.setCode(HttpStatus.SC_MOVED_PERMANENTLY);
- response.addHeader(new BasicHeader("Location", "http://test:test@" + localhost + ":" + port + "/secure"));
+ response.addHeader(new BasicHeader("Location", "http://test:test@localhost:" + port + "/secure"));
}
});