DispatcherServlet reads request body while log request information #22985
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: invalid
An issue that we don't feel is valid
Affects 5.1
DispatcherServlet.logRequest
method reads input stream with request body while executingrequest.getParameterMap()
. As soon as the input stream is read for the first time, it’s marked as consumed and cannot be read again.So any MVC controller will not be able to read request body after the logging. An exception appears in the log:
Sample:
Spring application with Spring MVC.
Controller that handles request body:
This works fine on Spring 4.3.18.
The text was updated successfully, but these errors were encountered: