Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86f5a149 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Change PacProxySelector to return unresolved addr" into klp-dev

parents a0bc738f 179d6e8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -97,7 +97,7 @@ public class PacProxySelector extends ProxySelector {
                } catch (Exception e) {
                } catch (Exception e) {
                    port = 8080;
                    port = 8080;
                }
                }
                ret.add(new Proxy(Type.HTTP, new InetSocketAddress(host, port)));
                ret.add(new Proxy(Type.HTTP, InetSocketAddress.createUnresolved(host, port)));
            }
            }
        }
        }
        if (ret.size() == 0) {
        if (ret.size() == 0) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -117,8 +117,8 @@ public class ProxyServer extends Thread {
                        if (!proxy.equals(Proxy.NO_PROXY)) {
                        if (!proxy.equals(Proxy.NO_PROXY)) {
                            // Only Inets created by PacProxySelector.
                            // Only Inets created by PacProxySelector.
                            InetSocketAddress inetSocketAddress =
                            InetSocketAddress inetSocketAddress =
                                    (InetSocketAddress)list.get(0).address();
                                    (InetSocketAddress)proxy.address();
                            server = new Socket(inetSocketAddress.getAddress(),
                            server = new Socket(inetSocketAddress.getHostName(),
                                    inetSocketAddress.getPort());
                                    inetSocketAddress.getPort());
                            sendLine(server, requestLine);
                            sendLine(server, requestLine);
                        } else {
                        } else {