Support getting parameters from PUT requests
- Dominant language
- Java
- Stars
- 325
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Many web frameworks, and some servlet containers have custom solutions which allow accessing request parameters from PUT requests. See related servlet-spec users mailing list [discussion](http://java.net/projects/servlet-spec/lists/users/archive/2013-02/message/56) for more details.
It would benefit all if this support was covered in servlet spec.
Latest, Servlet 3.1 public review spec, has related paragraph:
> 3.1.1 When Parameters Are Available
> The following are the conditions that must be met before post form data will be
> populated to the parameter set:
> 1\. The request is an HTTP or HTTPS request.
> 2\. The HTTP method is POST.
> 3\. The content type is application/x-www-form-urlencoded.
> 4\. The servlet has made an initial call of any of the getParameter family of methods
> on the request object.
> If the conditions are not met and the post form data is not included in the parameter
> set, the post data must still be available to the servlet via the request object's input
> stream. If the conditions are met, post form data will no longer be available for
> reading directly from the request object's input stream.
If there is no valid reason not to support PUT requests this paragraph should be changed to something like:
> 3.1.1 When Parameters Are Available
> The following are the conditions that must be met before form data will be
> populated to the parameter set:
> 1\. The request is an HTTP or HTTPS request.
> 2\. The HTTP method is POST or PUT.
> 3\. The content type is application/x-www-form-urlencoded.
> 4\. The servlet has made an initial call of any of the getParameter family of methods
> on the request object.
> If the conditions are not met and the form data is not included in the parameter
> set, the data must still be available to the servlet via the request object's input
> stream. If the conditions are met, form data will no longer be available for
> reading directly from the request object's input stream.
Contributor guide
Assessment
This issue has not been assessed yet.