From d5047b55ca5fc5ad2b72ca376becd6944bf4efd7 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 24 Jul 2013 14:58:23 +0000 Subject: Enable proxy usage for HttpClient git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@470 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../pdfover/gui/workflow/states/mobilebku/IAIKHandler.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java index 59519050..1587b66b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java @@ -31,7 +31,6 @@ import org.eclipse.swt.widgets.Shell; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Constants; import at.asit.pdfover.gui.controls.Dialog; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; import at.asit.pdfover.gui.controls.Dialog.ICON; @@ -101,9 +100,7 @@ public class IAIKHandler extends MobileBKUHandler { Protocol.registerProtocol("https", //$NON-NLS-1$ new Protocol("https", new TrustedSocketFactory(), 443)); //$NON-NLS-1$ - HttpClient client = new HttpClient(); - client.getParams().setParameter("http.useragent", //$NON-NLS-1$ - Constants.USER_AGENT_STRING); + HttpClient client = MobileBKUHelper.getHttpClient(); PostMethod post = new PostMethod(status.getBaseURL()); post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$ @@ -149,9 +146,7 @@ public class IAIKHandler extends MobileBKUHandler { return; } - HttpClient client = new HttpClient(); - client.getParams().setParameter("http.useragent", //$NON-NLS-1$ - Constants.USER_AGENT_STRING); + HttpClient client = MobileBKUHelper.getHttpClient(); String redirectURL = status.getBaseURL().substring(0, status.getBaseURL().lastIndexOf('/', @@ -245,9 +240,7 @@ public class IAIKHandler extends MobileBKUHandler { Protocol.registerProtocol("https", //$NON-NLS-1$ new Protocol("https", new TrustedSocketFactory(), 443)); //$NON-NLS-1$ - HttpClient client = new HttpClient(); - client.getParams().setParameter("http.useragent", //$NON-NLS-1$ - Constants.USER_AGENT_STRING); + HttpClient client = MobileBKUHelper.getHttpClient(); PostMethod post = new PostMethod(status.getBaseURL()); post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$ -- cgit v1.2.3