WW-4345 Reverts the commit 8aa4fe860693d29e5ef94026bf2a7532ed74b9ea

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

Branch: refs/heads/master
Commit: 63fa04e8146ec02fc256fa35a93454482254dcef
Parents: f49b084
Author: Lukasz Lenart <lukaszlen...@apache.org>
Authored: Tue Sep 16 08:51:16 2014 +0200
Committer: Lukasz Lenart <lukaszlen...@apache.org>
Committed: Tue Sep 16 08:51:16 2014 +0200

----------------------------------------------------------------------
 .../apache/struts2/dispatcher/Dispatcher.java   | 21 ++------------------
 1 file changed, 2 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/63fa04e8/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 436490e..c18d055 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -79,8 +79,6 @@ public class Dispatcher {
      */
     private static final Logger LOG = 
LoggerFactory.getLogger(Dispatcher.class);
 
-    public static final String MULTIPART_FORM_DATA = "multipart/form-data";
-
     /**
      * Provide a thread local instance.
      */
@@ -630,7 +628,7 @@ public class Dispatcher {
         Map requestMap = new RequestMap(request);
 
         // parameters map wrapping the http parameters.  ActionMapping 
parameters are now handled and applied separately
-        Map params = prepareParametersMap(request);
+        Map params = new HashMap(request.getParameterMap());
 
         // session map wrapping the http session
         Map session = new SessionMap(request);
@@ -647,21 +645,6 @@ public class Dispatcher {
     }
 
     /**
-     * Copies or creates new map to hold request parameters,
-     * there is a special treatment when uploading a file see WW-4345
-     */
-    protected Map prepareParametersMap(HttpServletRequest request) {
-        Map params;
-        String contentType = request.getContentType();
-        if (contentType != null && contentType.contains(MULTIPART_FORM_DATA)) {
-                       params = new HashMap();
-               } else {
-                       params = new HashMap(request.getParameterMap());
-               }
-        return params;
-    }
-
-    /**
      * @deprecated use version without ServletContext param
      */
     @Deprecated
@@ -849,7 +832,7 @@ public class Dispatcher {
         }
 
         String content_type = request.getContentType();
-        if (content_type != null && 
content_type.contains(MULTIPART_FORM_DATA)) {
+        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);

Reply via email to