ProxyContext { public ProxyContext(HttpRequest request, boolean ssl) { this(getHostColonPortFromHeader(request), ssl); } ProxyContext(HttpRequest request, boolean ssl);  ProxyContext(String raw, boolean ssl); @Override String toString(); static String removeHostColonPort(String uri); final String host; final int port; final boolean ssl; final String hostColonPort; }
@Test public void testProxyContext() { test("http: test("http: test("localhost:8080", false, "localhost", 8080); test("localhost:8080/foo", false, "localhost", 8080); test("localhost", false, "localhost", 80); test("localhost/foo", false, "localhost", 80); test("http: test("http: test("httpbin.org:443", false, "httpbin.org", 443); test("httpbin.org:443", true, "httpbin.org", 443); test("httpbin.org:443/foo", true, "httpbin.org", 443); test("httpbin.org", true, "httpbin.org", 443); test("httpbin.org/foo", true, "httpbin.org", 443); }