From 08a6508c5f010ff1e7c924f2153386f32b77fa5a Mon Sep 17 00:00:00 2001 From: Christian Maierhofer Date: Fri, 8 Jan 2016 10:22:09 +0100 Subject: default ports for http and https in ProvidePDFServlet --- .../main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3 From 4397feaa51771d4c2205623519077d4bb0384c88 Mon Sep 17 00:00:00 2001 From: Christian Maierhofer Date: Fri, 8 Jan 2016 10:55:17 +0100 Subject: Version 4.0.9 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d3376bf6..ad7249bb 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ task wrapper(type: Wrapper) { allprojects { apply plugin: 'com.github.ben-manes.versions' repositories { mavenCentral() } - version = '4.0.8' + version = '4.0.9' } configurations { -- cgit v1.2.3