[
https://issues.apache.org/jira/browse/FILEUPLOAD-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Maurice Schwang updated FILEUPLOAD-367:
----------------------------------------------
Description:
As already published to the mailing list
([https://lists.apache.org/thread/1d038yn6cjsn86fxs6fvkvtopxt40vo0)]
{{JakartaServletFileUpload.isMultipartContent}} (or
{{ServletFileUpload.isMultipartContent}} in 1.X) only allows POST requests to
be used in combination with multipart requests. PUT or PATCH requests including
a multipart body will always return {{{}false{}}}. Those should be allowed as
well.
Even though I think a large amount of APIs (and especially forms) will use POST
requests for that - REST APIs do certainly use the other two methods. That's at
least why I stumbled upon this in the first place, as an API I have to call
requires a multipart with PUT.
Not sure if this should rather be a feature request or not, feel free to edit.
Same with the priority. A potential fix / feature change could be
https://github.com/apache/commons-fileupload/compare/master...PierreSchwang:commons-fileupload:FILEUPLOAD-367-request-methods
was:
As already published to the mailing list
([https://lists.apache.org/thread/1d038yn6cjsn86fxs6fvkvtopxt40vo0)]
{{JakartaServletFileUpload.isMultipartContent}} (or
{{ServletFileUpload.isMultipartContent}} in 1.X) only allows POST requests to
be used in combination with multipart requests. PUT or PATCH requests including
a multipart body will always return {{{}false{}}}. Those should be allowed as
well.
Even though I think a large amount of APIs (and especially forms) will use POST
requests for that - REST APIs do certainly use the other two methods. That's at
least why I stumbled upon this in the first place, as an API I have to call
requires a multipart with PUT.
Not sure if this should rather be a feature request or not, feel free to edit.
Same with the priority.
> (Jakarta)ServletFileUpload.isMultipartContent should allow PUT/PATCH request
> methods
> ------------------------------------------------------------------------------------
>
> Key: FILEUPLOAD-367
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-367
> Project: Commons FileUpload
> Issue Type: Bug
> Reporter: Pierre Maurice Schwang
> Priority: Minor
>
> As already published to the mailing list
> ([https://lists.apache.org/thread/1d038yn6cjsn86fxs6fvkvtopxt40vo0)]
>
> {{JakartaServletFileUpload.isMultipartContent}} (or
> {{ServletFileUpload.isMultipartContent}} in 1.X) only allows POST requests to
> be used in combination with multipart requests. PUT or PATCH requests
> including a multipart body will always return {{{}false{}}}. Those should be
> allowed as well.
> Even though I think a large amount of APIs (and especially forms) will use
> POST requests for that - REST APIs do certainly use the other two methods.
> That's at least why I stumbled upon this in the first place, as an API I have
> to call requires a multipart with PUT.
> Not sure if this should rather be a feature request or not, feel free to
> edit. Same with the priority. A potential fix / feature change could be
> https://github.com/apache/commons-fileupload/compare/master...PierreSchwang:commons-fileupload:FILEUPLOAD-367-request-methods
--
This message was sent by Atlassian Jira
(v8.20.10#820010)