cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r328004 - /cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
Date Mon, 24 Oct 2005 09:13:47 GMT
Author: cziegeler
Date: Mon Oct 24 02:13:34 2005
New Revision: 328004

URL: http://svn.apache.org/viewcvs?rev=328004&view=rev
Log:
Fix parameter handling

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java?rev=328004&r1=328003&r2=328004&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
Mon Oct 24 02:13:34 2005
@@ -130,23 +130,22 @@
                     }
                 }
 
-                // get request params if the wrapped request is not the Cocoon request
-                if ( currentRequest == this.originalRequest ) {
-                    Enumeration parameters = currentRequest.getParameterNames();
-                    while (parameters.hasMoreElements()) {
-                        String paramName = (String) parameters.nextElement();
-                        String[] paramValues = this.getRequest().getParameterValues(paramName);
-                        String[] values = (String[]) this.portletParameterMap.get(paramName);
-    
-                        if ( !paramName.startsWith("cocoon-") ) {
-                            if (values != null) {
-                                String[] temp = new String[paramValues.length + values.length];
-                                System.arraycopy(paramValues, 0, temp, 0, paramValues.length);
-                                System.arraycopy(values, 0, temp, paramValues.length, values.length);
-                                paramValues = temp;
-                            }
-                            this.portletParameterMap.put(paramName, paramValues);
+                // get request params from the original Cocoon request
+                // but filter all cocoon portal request parameters.
+                Enumeration parameters = currentRequest.getParameterNames();
+                while (parameters.hasMoreElements()) {
+                    String paramName = (String) parameters.nextElement();
+                    String[] paramValues = this.getRequest().getParameterValues(paramName);
+                    String[] values = (String[]) this.portletParameterMap.get(paramName);
+
+                    if ( !paramName.startsWith("cocoon-") ) {
+                        if (values != null) {
+                            String[] temp = new String[paramValues.length + values.length];
+                            System.arraycopy(paramValues, 0, temp, 0, paramValues.length);
+                            System.arraycopy(values, 0, temp, paramValues.length, values.length);
+                            paramValues = temp;
                         }
+                        this.portletParameterMap.put(paramName, paramValues);
                     }
                 }
             }



Mime
View raw message