[ 
https://issues.apache.org/jira/browse/FILEUPLOAD-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542838#comment-13542838
 ] 

Richard commented on FILEUPLOAD-197:
------------------------------------

I have also encountered this problem. Whilst the spec may not specifically 
apply to PUT I believe that in a practical sense it would be expected that this 
api could use PUT to replace resources that were created via POST. How else 
then should they be replaced? The crux of the issue of that it's not really 
possible to get the correct content type or content length of the resource 
being "put", as if it's not a multi part request then those attributes are 
those of the request, not of the resource. To support this, multipart request 
has to be allowed for PUT.
                
> ServletFileUpload isMultipartContent method does not support HTTP PUT
> ---------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-197
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-197
>             Project: Commons FileUpload
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: David Wolverton
>
> This method explicitly checks for method POST. I believe the PUT method can 
> also have multipart requests, and there may be others. In our case we are 
> receiving rest calls using Spring Framework's CommonsMultipartResolver which 
> in turn uses this method of the Commons FileUpload library.
> Here is the offending code...
> if (!"post".equals(request.getMethod().toLowerCase())) {
>     return false;
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to