Support for Servlet request params with HTTP DELETE

This commit adds FormContentFilter, which is the same as the
HttpPutFormContentFilter but also supports DELETE.

The HttpPutFormContentFilter is now deprecated.

Issue: SPR-16874
This commit is contained in:
Rossen Stoyanchev
2018-06-01 15:22:24 -04:00
parent 7396309dba
commit 124d4c833c
6 changed files with 418 additions and 227 deletions

View File

@@ -1046,14 +1046,14 @@ The `spring-web` module provides some useful filters.
[[filters-http-put]]
=== HTTP PUT Form
=== Form Data
Browsers can only submit form data via HTTP GET or HTTP POST but non-browser clients can also
use HTTP PUT and PATCH. The Servlet API requires `ServletRequest.getParameter{asterisk}()`
use HTTP PUT, PATCH, and DELETE. The Servlet API requires `ServletRequest.getParameter{asterisk}()`
methods to support form field access only for HTTP POST.
The `spring-web` module provides `HttpPutFormContentFilter` that intercepts HTTP PUT and
PATCH requests with content type `application/x-www-form-urlencoded`, reads the form data from
The `spring-web` module provides `FormContentFilter` that intercepts HTTP PUT, PATCH, and DELETE
requests with content type `application/x-www-form-urlencoded`, reads the form data from
the body of the request, and wraps the `ServletRequest` in order to make the form data
available through the `ServletRequest.getParameter{asterisk}()` family of methods.