Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.springframework.web.multipart.support.StandardServletMultipartResolver.cleanupMultipart causes an IOException on Resin [SPR-9299] #13937

Closed
spring-projects-issues opened this issue Apr 2, 2012 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Ralph Schaer opened SPR-9299 and commented

Testing the StandardServletMultipartResolver on Resin 4.0.27 with this form.

<form action="uploadTest" method="post" enctype="multipart/form-data">
<input type="hidden" name="hiddenParameter" value="theHiddenValue" />
...
</form>

The resolver tries to cleanup the parts with the cleanupMultipart method
by calling part.delete();

Resin throws this exception

8:08:25.093 [resin-port-8080-19] WARN o.s.w.m.s.StandardServletMultipartResolver - Failed to perform cleanup of multipart items
ava.io.IOException: Part.delete() is not applicable to part 'hiddenParameter':'theHiddenValue'
at com.caucho.server.http.AbstractCauchoRequest$PartImpl.delete(AbstractauchoRequest.java:1086) ~[resin.jar:4.0.27]
at org.springframework.web.multipart.support.StandardServletMultipartResolver.cleanupMultipart(StandardServletMultipartResolver.java:65) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

Not sure why Resin not simply ignores the call to delete() for this kind of parts, as all the other servers (Tomcat, Jetty) do.


Affects: 3.1.1

Referenced from: commits 9fcb578, 7ea85a9

@spring-projects-issues spring-projects-issues added type: bug A general bug in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1.2 milestone Jan 11, 2019
bclozel added a commit that referenced this issue Oct 23, 2024
A workaround was added for the Resin Servlet container in gh-13937.
This avoids attempting to delete parts that are not named, because the
`part.delete()` call would fail for non-file entries. This can be
problematic for files that are unnamed as they might not be removed by
the Framework.

This commit removes this workaround as Resin is not supported anymore.

Fixes gh-33511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants