From 81a4b36c0854613207cf0bddfa4144f25dfa26d7 Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 16 Aug 2013 21:33:59 +0200 Subject: [PATCH] we don't need to set the default port manually as wicket does that for us --- .../com/commafeed/frontend/CommaFeedApplication.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/commafeed/frontend/CommaFeedApplication.java b/src/main/java/com/commafeed/frontend/CommaFeedApplication.java index c743b0a4..512cda44 100644 --- a/src/main/java/com/commafeed/frontend/CommaFeedApplication.java +++ b/src/main/java/com/commafeed/frontend/CommaFeedApplication.java @@ -114,15 +114,12 @@ public class CommaFeedApplication extends AuthenticatedWebApplication { return new UrlRenderer(getRequest()) { @Override public String renderUrl(Url url) { + // override wicket's relative-to-absolute url conversion with what we know is the correct protocol String publicUrl = applicationSettingsService.get().getPublicUrl(); if (StringUtils.isNotBlank(publicUrl)) { Url parsed = Url.parse(publicUrl); - - String protocol = parsed.getProtocol(); - url.setProtocol(protocol); - - Integer port = parsed.getPort(); - url.setPort(port != null ? port : StringUtils.equalsIgnoreCase(protocol, "http") ? 80 : 443); + url.setProtocol(parsed.getProtocol()); + url.setPort(parsed.getPort()); } return super.renderUrl(url); }