struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [18/28] struts git commit: WW-4467 disableRequestAttributeValueStackLookup applied to MultiPartRequestWrapper
Date Thu, 19 Mar 2015 08:50:17 GMT
WW-4467 disableRequestAttributeValueStackLookup applied
to MultiPartRequestWrapper


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/a1d277fa
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/a1d277fa
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/a1d277fa

Branch: refs/heads/master
Commit: a1d277fac53e8567dae28842599b8ab92872a92b
Parents: 4ad0232
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Mar 6 21:20:08 2015 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Mar 6 21:20:08 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/struts2/dispatcher/Dispatcher.java   |  2 +-
 .../dispatcher/multipart/MultiPartRequestWrapper.java    | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/a1d277fa/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
index c18d055..3a4e305 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -835,7 +835,7 @@ public class Dispatcher {
         if (content_type != null && content_type.contains("multipart/form-data"))
{
             MultiPartRequest mpr = getMultiPartRequest();
             LocaleProvider provider = getContainer().getInstance(LocaleProvider.class);
-            request = new MultiPartRequestWrapper(mpr, request, getSaveDir(), provider);
+            request = new MultiPartRequestWrapper(mpr, request, getSaveDir(), provider, disableRequestAttributeValueStackLookup);
         } else {
             request = new StrutsRequestWrapper(request, disableRequestAttributeValueStackLookup);
         }

http://git-wip-us.apache.org/repos/asf/struts/blob/a1d277fa/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
b/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
index 0bff59d..ddc4275 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
@@ -21,6 +21,7 @@
 
 package org.apache.struts2.dispatcher.multipart;
 
+import com.opensymphony.xwork2.DefaultLocaleProvider;
 import com.opensymphony.xwork2.LocaleProvider;
 import com.opensymphony.xwork2.util.LocalizedTextUtil;
 import com.opensymphony.xwork2.util.logging.Logger;
@@ -71,8 +72,10 @@ public class MultiPartRequestWrapper extends StrutsRequestWrapper {
      * @param saveDir Target directory for any files that we save
      * @param provider
      */
-    public MultiPartRequestWrapper(MultiPartRequest multiPartRequest, HttpServletRequest
request, String saveDir, LocaleProvider provider) {
-        super(request);
+    public MultiPartRequestWrapper(MultiPartRequest multiPartRequest, HttpServletRequest
request,
+                                   String saveDir, LocaleProvider provider,
+                                   boolean disableRequestAttributeValueStackLookup) {
+        super(request, disableRequestAttributeValueStackLookup);
         errors = new ArrayList<String>();
         multi = multiPartRequest;
         defaultLocale = provider.getLocale();
@@ -90,6 +93,10 @@ public class MultiPartRequestWrapper extends StrutsRequestWrapper {
         } 
     }
 
+    public MultiPartRequestWrapper(MultiPartRequest multiPartRequest, HttpServletRequest
request, String saveDir, LocaleProvider provider) {
+        this(multiPartRequest, request, saveDir, provider, false);
+    }
+
     protected void setLocale(HttpServletRequest request) {
         if (defaultLocale == null) {
             defaultLocale = request.getLocale();


Mime
View raw message