portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shins...@apache.org
Subject svn commit: r322529 - in /portals/jetspeed-2/trunk: components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
Date Mon, 17 Oct 2005 00:08:54 GMT
Author: shinsuke
Date: Sun Oct 16 17:08:48 2005
New Revision: 322529

URL: http://svn.apache.org/viewcvs?rev=322529&view=rev
Log:
submitted by Thorsten Berger. fixed http://issues.apache.org/jira/browse/JS2-376

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java?rev=322529&r1=322528&r2=322529&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
Sun Oct 16 17:08:48 2005
@@ -141,6 +141,14 @@
                 }
             }
 
+            boolean decode = getRequest().getAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE)
== null
+                    && getCharacterEncoding() != null;
+            if (decode)
+            {
+                getRequest().setAttribute(PortalReservedParameters.PARAMETER_ALREADY_DECODED_ATTRIBUTE,
+                        new Boolean(true));
+            }
+
             //get servlet params
             for (Enumeration parameters = getRequest().getParameterNames(); parameters.hasMoreElements();)
             {
@@ -148,7 +156,7 @@
                 String[] paramValues = (String[]) getRequest().getParameterValues(paramName);
                 String[] values = (String[]) portletParameters.get(paramName);
 
-                if (getCharacterEncoding() != null)
+                if (decode)
                 {
                     for (int i = 0; i < paramValues.length; i++)
                     {

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java?rev=322529&r1=322528&r2=322529&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
Sun Oct 16 17:08:48 2005
@@ -48,4 +48,5 @@
     public static final String OVERRIDE_PORTLET_TITLE_ATTR = "org.apache.jetspeed.portlet.title";
     public static final String HEADER_RESOURCE_ATTRIBUTE = "org.apache.jetspeed.headerresource";
     public static final String PATH_ATTRIBUTE = "org.apache.jetspeed.Path";
+    public static final String PARAMETER_ALREADY_DECODED_ATTRIBUTE = "org.apache.jetspeed.parameterAlreadyDecoded";
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message