From 0fca149b7fb1748ef6157ae522b6d369f6876aee Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 24 Jul 2013 14:58:10 +0000 Subject: Proxy debugging git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@468 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/workflow/states/PrepareSigningState.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'pdf-over-gui/src/main/java/at') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index b66f9d3c..c1b76437 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -79,30 +79,34 @@ public class PrepareSigningState extends State { final String proxyUser = configuration.getProxyUser(); final String proxyPass = configuration.getProxyPass(); - if (proxyPort > 0 && proxyPort <= 0xFFFF) { - System.setProperty( - "http.proxyPort", Integer.toString(proxyPort)); //$NON-NLS-1$ - System.setProperty( - "https.proxyPort", Integer.toString(proxyPort)); //$NON-NLS-1$ - } - if (proxyHost != null && !proxyHost.isEmpty()) { + log.debug("Setting proxy host to " + proxyHost); //$NON-NLS-1$ System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$ System.setProperty("https.proxyHost", proxyHost); //$NON-NLS-1$ } + if (proxyPort > 0 && proxyPort <= 0xFFFF) { + String port = Integer.toString(proxyPort); + log.debug("Setting proxy port to " + port); //$NON-NLS-1$ + System.setProperty("http.proxyPort", port); //$NON-NLS-1$ + System.setProperty("https.proxyPort", port); //$NON-NLS-1$ + } + if (proxyUser != null && !proxyUser.isEmpty()) { + log.debug("Setting proxy username to " + proxyUser); //$NON-NLS-1$ System.setProperty("http.proxyUser", proxyUser); //$NON-NLS-1$ System.setProperty("https.proxyUser", proxyUser); //$NON-NLS-1$ } if (proxyPass != null && !proxyPass.isEmpty()) { + log.debug("Setting proxy password"); //$NON-NLS-1$ System.setProperty("http.proxyPassword", proxyPass); //$NON-NLS-1$ System.setProperty("https.proxyPassword", proxyPass); //$NON-NLS-1$ } if (proxyUser != null && !proxyUser.isEmpty() && proxyPass != null && !proxyPass.isEmpty()) { + log.debug("Enabling proxy authentication"); //$NON-NLS-1$ Authenticator.setDefault(new Authenticator() { /* (non-Javadoc) * @see java.net.Authenticator#getPasswordAuthentication() -- cgit v1.2.3