if (ex instanceof NoHttpResponseException) { final NoHttpResponseException updatedex = new NoHttpResponseException( route.getTargetHost().toHostString() + " failed to respond"); updatedex.setStackTrace(ex.getStackTrace()); throw updatedex;
@Test public void testToHostString() { final HttpHost host1 = new HttpHost("somehost"); Assert.assertEquals("somehost", host1.toHostString()); final HttpHost host2 = new HttpHost("somehost"); Assert.assertEquals("somehost", host2.toHostString()); final HttpHost host3 = new HttpHost("somehost", -1); Assert.assertEquals("somehost", host3.toHostString()); final HttpHost host4 = new HttpHost("somehost", 8888); Assert.assertEquals("somehost:8888", host4.toHostString()); }
this.log.debug(host.toHostString() + " requested authentication");
final HttpRequest connect = new BasicHttpRequest("CONNECT", nextHop, nextHop.toHostString()); connect.setVersion(HttpVersion.HTTP_1_1);
ClassicHttpResponse response = null; final String authority = target.toHostString(); final ClassicHttpRequest connect = new BasicClassicHttpRequest("CONNECT", target, authority); connect.setVersion(HttpVersion.HTTP_1_1);
ClassicHttpResponse response; final ClassicHttpRequest connect = new BasicClassicHttpRequest("CONNECT", host.toHostString());