[Yanel-commits] rev 45053 - public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager

michi at wyona.com michi at wyona.com
Thu Oct 15 16:05:56 CEST 2009


Author: michi
Date: 2009-10-15 16:05:55 +0200 (Thu, 15 Oct 2009)
New Revision: 45053

Modified:
   public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java
Log:
note about proxy added

Modified: public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java	2009-10-15 13:10:07 UTC (rev 45052)
+++ public/yanel/trunk/src/contributions/resources/policymanager/src/java/org/wyona/yanel/impl/resources/policymanager/PolicyManagerResource.java	2009-10-15 14:05:55 UTC (rev 45053)
@@ -347,7 +347,9 @@
         String referer = getEnvironment().getRequest().getHeader("Referer");
         if(referer != null) {
             java.net.URL url = new java.net.URL(referer);
-            // TODO: Replace with proxy settings!
+            String filenameQSWithoutLeadingSlash = url.getFile().substring(url.getFile().lastIndexOf("/") + 1);
+            log.warn("DEBUG: Manipulated referer: '" + filenameQSWithoutLeadingSlash + "'");
+            // IMPORTANT: The below might cause problems with certain reverse proxys, whereas with httpd and mod_proxy it seems to be fine. If this should be a problem, then either strip off the webapp and realm prefix, or use the host-page-url as base and submit a relative path using the filenameQSWithoutLeadingSlash
             return replaceEntities(referer);
             //return backToRealm  + replaceEntities(url.getFile() + "?" + url.getQuery());
         } else {



More information about the Yanel-commits mailing list