summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:34:15 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:34:15 +0000
commit81c5ae84e538e5891df9fb828b173e5fb1b08f78 (patch)
treee42b93d747bbd04b54a01199fb164e3da588dfe9 /pdf-over-gui/src
parent1e661142fddcfc04fe3ded3808cf7616f1328afd (diff)
downloadmocca-81c5ae84e538e5891df9fb828b173e5fb1b08f78.tar.gz
mocca-81c5ae84e538e5891df9fb828b173e5fb1b08f78.tar.bz2
mocca-81c5ae84e538e5891df9fb828b173e5fb1b08f78.zip
Include port in URLs
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@387 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java12
1 files changed, 9 insertions, 3 deletions
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 cd9f0939..2c00b3a9 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
@@ -62,7 +62,9 @@ public class IAIKHandler extends MobileBKUHandler {
String credentialURL = MobileBKUHelper.extractTag(responseData,
"name=\"userCredLogon\" method=\"post\" action=\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
URL baseURL = new URL(status.getBaseURL());
- credentialURL = baseURL.getProtocol() + "://" + baseURL.getHost() + //$NON-NLS-1$
+ int p = baseURL.getPort();
+ String port = ((p != -1) && (p != baseURL.getDefaultPort())) ? ":" + p : ""; //$NON-NLS-1$ //$NON-NLS-2$
+ credentialURL = baseURL.getProtocol() + "://" + baseURL.getHost() + port + //$NON-NLS-1$
(credentialURL.startsWith("/") ? "" : "/") + credentialURL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String viewState = MobileBKUHelper.extractTag(responseData,
@@ -184,7 +186,9 @@ public class IAIKHandler extends MobileBKUHandler {
redirectURL = MobileBKUHelper.extractTag(responseData,
"redirect url=\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
URL baseURL = new URL(status.getBaseURL());
- redirectURL = baseURL.getProtocol() + "://" + baseURL.getHost() + //$NON-NLS-1$
+ int p = baseURL.getPort();
+ String port = ((p != -1) && (p != baseURL.getDefaultPort())) ? ":" + p : ""; //$NON-NLS-1$ //$NON-NLS-2$
+ redirectURL = baseURL.getProtocol() + "://" + baseURL.getHost() + port +//$NON-NLS-1$
(redirectURL.startsWith("/") ? "" : "/") + redirectURL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
responseData = getRedirect(client, redirectURL);
@@ -203,7 +207,9 @@ public class IAIKHandler extends MobileBKUHandler {
String tanURL = MobileBKUHelper.extractTag(responseData,
"name=\"j_idt6\" method=\"post\" action=\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
URL baseURL = new URL(status.getBaseURL());
- tanURL = baseURL.getProtocol() + "://" + baseURL.getHost() + //$NON-NLS-1$
+ int p = baseURL.getPort();
+ String port = ((p != -1) && (p != baseURL.getDefaultPort())) ? ":" + p : ""; //$NON-NLS-1$ //$NON-NLS-2$
+ tanURL = baseURL.getProtocol() + "://" + baseURL.getHost() + port + //$NON-NLS-1$
(tanURL.startsWith("/") ? "" : "/") + tanURL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
tanURL = status.ensureSessionID(tanURL);