mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
WW-4345 Reverts the commit 8aa4fe8606
This commit is contained in:
@@ -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);
|
||||
@@ -646,21 +644,6 @@ public class Dispatcher {
|
||||
return extraContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user