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

Martin Denham (JIRA) jira at crosswire.org
Thu Dec 23 13:00:16 MST 2010


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

Martin Denham updated JS-149:
-----------------------------

    Priority: Minor  (was: Major)

> 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
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://www.crosswire.org/bugs/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jsword-devel mailing list