Changeset 536


Ignore:
Timestamp:
11/26/13 14:14:09 (10 years ago)
Author:
jts21
Message:

Tested JfxBrowser with proxy auth (working), fixed some mistakes in proxy auth error messages, also tested JfxBrowser on Java 8 (seems to work perfectly with no changes)

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameUtils.java

    r535 r536  
    804804                        }
    805805                }
     806                if(host == null) {
     807                        MessageBay.displayMessage("http_host was not defined!", Color.ORANGE);
     808                }
     809                if(port == null) {
     810                        MessageBay.displayMessage("http_port was not defined! (defaulted to 80)", Color.ORANGE);
     811                        port = "80";
     812                }
     813                if(user == null) {
     814                        MessageBay.displayMessage("http_user was not defined!", Color.ORANGE);
     815                }
     816                if(pass == null) {
     817                        MessageBay.displayMessage("http_pass was not defined!", Color.ORANGE);
     818                }
    806819                System.setProperty("http.proxyHost", host);
    807820                System.setProperty("http.proxyPort", port);
     
    825838                                if(str.startsWith("http_host:")) {
    826839                                        if(host != null) {
    827                                                 MessageBay.displayMessage("http_host was defined multiple times!", Color.ORANGE);
     840                                                MessageBay.displayMessage("https_host was defined multiple times!", Color.ORANGE);
    828841                                        }
    829842                                        host = str.substring(10).trim();
    830                                 } else if(str.startsWith("http_port:")) {
     843                                } else if(str.startsWith("https_port:")) {
    831844                                        if(port!= null) {
    832                                                 MessageBay.displayMessage("http_port was defined multiple times!", Color.ORANGE);
     845                                                MessageBay.displayMessage("https_port was defined multiple times!", Color.ORANGE);
    833846                                        }
    834847                                        port = str.substring(10).trim();
    835                                 } else if(str.startsWith("http_user:")) {
     848                                } else if(str.startsWith("https_user:")) {
    836849                                        if(user != null) {
    837                                                 MessageBay.displayMessage("http_user was defined multiple times!", Color.ORANGE);
     850                                                MessageBay.displayMessage("https_user was defined multiple times!", Color.ORANGE);
    838851                                        }
    839852                                        user = str.substring(11).trim();
    840                                 } else if(str.startsWith("http_pass:")) { // unencrypted password
     853                                } else if(str.startsWith("https_pass:")) { // unencrypted password
    841854                                        if(pass != null) {
    842                                                 MessageBay.displayMessage("http_pass was defined multiple times!", Color.ORANGE);
     855                                                MessageBay.displayMessage("https_pass was defined multiple times!", Color.ORANGE);
    843856                                        }
    844857                                        pass = str.substring(11).trim();
     
    850863                                                                passwordWidget = (Password) InteractiveWidget.createWidget((Text)config);
    851864                                                                if(pass != null) {
    852                                                                         MessageBay.displayMessage("http_pass was defined multiple times!", Color.ORANGE);
     865                                                                        MessageBay.displayMessage("https_pass was defined multiple times!", Color.ORANGE);
    853866                                                                }
    854867                                                                pass = passwordWidget.getPassword();
     
    871884                                        }
    872885                                        if(pass != null) {
    873                                                 MessageBay.displayMessage("http_pass was defined multiple times!", Color.ORANGE);
     886                                                MessageBay.displayMessage("https_pass was defined multiple times!", Color.ORANGE);
    874887                                        }
    875888                                        pass = passwordWidget.getPassword();
    876889                                }
    877890                        }
     891                }
     892                if(host == null) {
     893                        MessageBay.displayMessage("https_host was not defined!", Color.ORANGE);
     894                }
     895                if(port == null) {
     896                        MessageBay.displayMessage("https_port was not defined! (defaulted to 80)", Color.ORANGE);
     897                        port = "80";
     898                }
     899                if(user == null) {
     900                        MessageBay.displayMessage("https_user was not defined!", Color.ORANGE);
     901                }
     902                if(pass == null) {
     903                        MessageBay.displayMessage("https_pass was not defined!", Color.ORANGE);
    878904                }
    879905                System.setProperty("https.proxyHost", host);
  • trunk/src/org/expeditee/io/ProxyAuth.java

    r535 r536  
    66public class ProxyAuth extends Authenticator {
    77
    8         private String httpUser, httpPass, httpsUser, httpsPass;
     8        private String httpUser = null, httpPass = null, httpsUser = null, httpsPass = null;
    99       
    1010        public ProxyAuth() {
  • trunk/src/org/expeditee/items/widgets/JfxBrowser.java

    r534 r536  
    212212
    213213        public JfxBrowser(Text source, String[] args) {
    214                 super(source, new WebBrowserPanel("http://waikato.ac.nz"), -1, 500, -1, -1, 300, -1);
     214                // Testing proxy auth
     215                super(source, new WebBrowserPanel("http://stackoverflow.com"), -1, 500, -1, -1, 300, -1);
    215216
    216217                _browser = (WebBrowserPanel) _swingComponent;
Note: See TracChangeset for help on using the changeset viewer.