[jsword-devel] [JIRA] Updated: (JS-149) Possible bug in WebResource proxy code

DM Smith (JIRA) jira at crosswire.org
Sun Feb 6 13:52:10 MST 2011


     [ http://www.crosswire.org/bugs/browse/JS-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

DM Smith updated JS-149:
------------------------

    Fix Version/s: 1.6.1

> Possible bug in WebResource proxy code
> --------------------------------------
>
>                 Key: JS-149
>                 URL: http://www.crosswire.org/bugs/browse/JS-149
>             Project: JSword
>          Issue Type: Bug
>          Components: o.c.common.util
>         Environment: Android
>            Reporter: Martin Denham
>            Assignee: DM Smith
>            Priority: Minor
>             Fix For: 1.6.1
>
>
> I don't know if this is correct or not but thought I would raise it in case because it looks a little odd.
> Should the ProxySelectorRoutePlanner and setRoutePlanner lines below be in the preceding proxy related if statement.  Also, the last line isn't indented correctly which could cause confusion.
>     public WebResource(URI theURI, String theProxyHost, Integer theProxyPort, int theTimeout) {
>         uri = theURI;
>         client = new DefaultHttpClient();
>         HttpParams params = client.getParams();
>         // Allowable time between packets
>         HttpConnectionParams.setSoTimeout(params, theTimeout);
>         // Allowable time to get a connection
>         HttpConnectionParams.setConnectionTimeout(params, theTimeout);
>         // Configure proxy info if necessary and defined
>         if (theProxyHost != null && theProxyHost.length() > 0) {
>             // Configure the host and port
>             HttpHost proxy = new HttpHost(theProxyHost, theProxyPort == null ? -1 : theProxyPort.intValue());
>             ConnRouteParams.setDefaultProxy(params, proxy);
>         }
>         ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(
>                 client.getConnectionManager().getSchemeRegistry(),
>                 ProxySelector.getDefault());
>                 ((AbstractHttpClient) client).setRoutePlanner(routePlanner);
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jsword-devel mailing list