File tree 1 file changed +6
-3
lines changed
spring-web/src/main/java/org/springframework/web/multipart/support
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2011 the original author or authors.
2
+ * Copyright 2002-2012 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -59,10 +59,13 @@ public MultipartHttpServletRequest resolveMultipart(HttpServletRequest request)
59
59
}
60
60
61
61
public void cleanupMultipart (MultipartHttpServletRequest request ) {
62
- // To be on the safe side: explicitly delete all parts.
62
+ // To be on the safe side: explicitly delete the parts,
63
+ // but only actual file parts (for Resin compatibility)
63
64
try {
64
65
for (Part part : request .getParts ()) {
65
- part .delete ();
66
+ if (request .getFile (part .getName ()) != null ) {
67
+ part .delete ();
68
+ }
66
69
}
67
70
}
68
71
catch (Exception ex ) {
You can’t perform that action at this time.
0 commit comments