cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r410078 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/http/HttpRequest.java
Date Mon, 29 May 2006 11:44:49 GMT
Author: antonio
Date: Mon May 29 04:44:49 2006
New Revision: 410078

URL: http://svn.apache.org/viewvc?rev=410078&view=rev
Log:
Fix COCOON-1625 redundant copying between container and form encoding. Thanks to Aleksander
Bandelj (aleksander.bandelj@academa.si).

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/http/HttpRequest.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/http/HttpRequest.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/http/HttpRequest.java?rev=410078&r1=410077&r2=410078&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/http/HttpRequest.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/http/HttpRequest.java
Mon May 29 04:44:49 2006
@@ -390,7 +390,11 @@
 
     public String getParameter(String name) {
         String value = this.req.getParameter(name);
-        if (this.form_encoding == null || value == null) {
+        if (this.form_encoding == null || this.form_encoding == null || value == null) {
+            return value;
+        }
+        // Form and container encoding are equal, skip expensive value decoding
+        if (this.container_encoding.equals(this.form_encoding)) {
             return value;
         }
         return decode(value);



Mime
View raw message