Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement in proxy fallback selection #54

Open
GoogleCodeExporter opened this issue Feb 5, 2016 · 0 comments
Open

Improvement in proxy fallback selection #54

GoogleCodeExporter opened this issue Feb 5, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1.Configure a PAC file having one or more unreachable proxies.
2.Wrap ProxyListFallbackSelector around PacProxySelector.
3.Try to browse some URL for which no proxy is responsive.

What is the expected output? What do you see instead?

Actual behavior: The selection completely relies on filtering of unresponsive 
proxies even if we don't have anything to fallback on, i.e. empty list.
Expected behavior: Better to retry unresponsive proxy when there is nothing to 
fallback on.

What version of the product are you using? On what operating system?

Library version: 2013-12-09
OS version: Windows 7

Please provide any additional information below.

Proposed fix code snippet:

@Override
public List<Proxy> select(URI uri) {
    cleanupCache();
    List<Proxy> proxyList = this.delegate.select(uri);
    List<Proxy> result = filterUnresponsiveProxiesFromList(proxyList);
    if (result.isEmpty()) {
        return proxyList;
    }
    return result;
}

Original issue reported on code.google.com by dharmara...@gmail.com on 17 Nov 2014 at 10:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant