roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghu...@apache.org
Subject svn commit: r1513383 - /roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/InitFilter.java
Date Tue, 13 Aug 2013 07:47:33 GMT
Author: ghuber
Date: Tue Aug 13 07:47:33 2013
New Revision: 1513383

URL: http://svn.apache.org/r1513383
Log:
Make sure we set correct absolute Url on startup if first page is via https.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/InitFilter.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/InitFilter.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/InitFilter.java?rev=1513383&r1=1513382&r2=1513383&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/InitFilter.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/InitFilter.java
Tue Aug 13 07:47:33 2013
@@ -76,7 +76,14 @@ public class InitFilter implements Filte
         
         String url = null;
         
-        String fullUrl = request.getRequestURL().toString();
+        String fullUrl = null;
+
+        if (!request.isSecure()) {
+            fullUrl = request.getRequestURL().toString();
+        } else {
+            fullUrl = "http://" + request.getServerName()
+                    + request.getContextPath();
+        }
         
         // if the uri is only "/" then we are basically done
         if("/".equals(request.getRequestURI())) {



Mime
View raw message