Class HttpPutFormContentFilter

  • All Implemented Interfaces:
    Filter, Aware, BeanNameAware, DisposableBean, InitializingBean, EnvironmentAware, EnvironmentCapable, ServletContextAware

    as of 5.1 in favor of FormContentFilter which is the same but also handles DELETE.

    public class HttpPutFormContentFilter
    extends OncePerRequestFilter
    Filter that makes form encoded data available through the ServletRequest.getParameter*() family of methods during HTTP PUT or PATCH requests.

    The Servlet spec requires form data to be available for HTTP POST but not for HTTP PUT or PATCH requests. This filter intercepts HTTP PUT and PATCH requests where content type is 'application/x-www-form-urlencoded', reads form encoded content from the body of the request, and wraps the ServletRequest in order to make the form data available as request parameters just like it is for HTTP POST requests.

    Rossen Stoyanchev