[icedtea-web] RFC: Patch to fix proxy detection with FF has only 1 profile

Deepak Bhole dbhole at redhat.com
Mon Aug 29 12:54:57 PDT 2011


Hi,

This patch is based on one from Lukas Zachar <lzachar at redhat dot
com>, and it fixes a javaws issue whereby if Firefox has only 1 profile
defined, javaws does not use the proxy info.

ChangeLog:
2011-08-29  Deepak Bhole <dbhole at redhat.com>

    RH734081: Javaws cannot use proxy settings from Firefox
    * netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
    (find): Only process Profile sections. Do not throw an exception if a
    Default= line is not found if is not guaranteed to exist.

Okay for HEAD and 1.1?

Cheers,
Deepak
-------------- next part --------------
diff -r 36270c76a533 NEWS
--- a/NEWS	Wed Aug 24 15:17:46 2011 -0400
+++ b/NEWS	Mon Aug 29 15:53:41 2011 -0400
@@ -22,6 +22,7 @@
   - PR771: IcedTea-Web certificate verification code does not use the right API
   - PR742: IcedTea-Web checks certs only upto 1 level deep before declaring them untrusted.
   - PR769: IcedTea-Web does not work with some ssl sites with OpenJDK7
+  - RH734081: Javaws cannot use proxy settings from Firefox
 
 New in release 1.1 (2011-XX-XX):
 * Security updates
diff -r 36270c76a533 netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
--- a/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java	Wed Aug 24 15:17:46 2011 -0400
+++ b/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java	Mon Aug 29 15:53:41 2011 -0400
@@ -93,7 +93,7 @@
                 }
 
                 line = line.trim();
-                if (line.startsWith("[") && line.endsWith("]")) {
+                if (line.startsWith("[Profile") && line.endsWith("]")) {
                     if (foundDefaultSection) {
                         break;
                     }
@@ -115,7 +115,7 @@
             reader.close();
         }
 
-        if (!foundDefaultSection) {
+        if (!foundDefaultSection && linesInSection.size() == 0) {
             throw new FileNotFoundException("preferences file");
         }
 


More information about the distro-pkg-dev mailing list