aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-02-09 08:07:45 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-02-09 08:07:45 +0100
commitdfde0e5bcde5ab48940ee91b72c8251492ffdc21 (patch)
treebdb41c1fb4c9550c017f80318b23dabac46556c8 /pdf-as-web/src/main/java/at/gv
parent40d43a9b8688eb0a1c64aff8e4e6b4ee0b763a2c (diff)
parent4397feaa51771d4c2205623519077d4bb0384c88 (diff)
downloadpdf-as-4-dfde0e5bcde5ab48940ee91b72c8251492ffdc21.tar.gz
pdf-as-4-dfde0e5bcde5ab48940ee91b72c8251492ffdc21.tar.bz2
pdf-as-4-dfde0e5bcde5ab48940ee91b72c8251492ffdc21.zip
Merge branch 'master' of gitlab.iaik.tugraz.at:afitzek/pdf-as-4
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java
index 6ff6ccf7..815d532e 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java
@@ -101,10 +101,15 @@ public class ProvidePDFServlet extends HttpServlet {
String template = PdfAsHelper.getInvokeRedirectTemplateSL();
URL url = new URL(invokeURL);
+ int p=url.getPort();
+ //no port, but http or https --> use default port
+ if((url.getProtocol().equalsIgnoreCase("https") || url.getProtocol().equalsIgnoreCase("http")) && p == -1){
+ p=url.getDefaultPort();
+ }
String invokeUrlProcessed = url.getProtocol() + "://" + // "http" + "://
url.getHost() + // "myhost"
":" + // ":"
- url.getPort() + // "8080"
+ p + // "8080"
url.getPath();
template = template.replace("##INVOKE_URL##", invokeUrlProcessed);