|
14 | 14 |
|
15 | 15 | import static org.asynchttpclient.util.MiscUtil.isNonEmpty;
|
16 | 16 |
|
17 |
| -import org.asynchttpclient.AsyncHttpClientConfig; |
18 |
| -import org.asynchttpclient.ProxyServer; |
19 |
| -import org.asynchttpclient.ProxyServer.Protocol; |
20 |
| -import org.asynchttpclient.ProxyServerSelector; |
21 |
| -import org.asynchttpclient.Request; |
22 |
| -import org.slf4j.Logger; |
23 |
| -import org.slf4j.LoggerFactory; |
24 |
| - |
25 | 17 | import java.net.InetSocketAddress;
|
26 | 18 | import java.net.Proxy;
|
27 | 19 | import java.net.ProxySelector;
|
|
30 | 22 | import java.util.Locale;
|
31 | 23 | import java.util.Properties;
|
32 | 24 |
|
| 25 | +import org.asynchttpclient.AsyncHttpClientConfig; |
| 26 | +import org.asynchttpclient.ProxyServer; |
| 27 | +import org.asynchttpclient.ProxyServer.Protocol; |
| 28 | +import org.asynchttpclient.ProxyServerSelector; |
| 29 | +import org.asynchttpclient.Request; |
| 30 | +import org.slf4j.Logger; |
| 31 | +import org.slf4j.LoggerFactory; |
| 32 | + |
33 | 33 | /**
|
34 | 34 | * Utilities for Proxy handling.
|
35 | 35 | *
|
@@ -207,6 +207,7 @@ public ProxyServer select(URI uri) {
|
207 | 207 | case HTTP:
|
208 | 208 | if (!(proxy.address() instanceof InetSocketAddress)) {
|
209 | 209 | log.warn("Don't know how to connect to address " + proxy.address());
|
| 210 | + return null; |
210 | 211 | } else {
|
211 | 212 | InetSocketAddress address = (InetSocketAddress) proxy.address();
|
212 | 213 | return new ProxyServer(Protocol.HTTP, address.getHostName(), address.getPort());
|
|
0 commit comments