Closed rbordon-meli closed 4 years ago
I`m currently suffering intensive with this bug. about 10 times per sec in multiple endpoins for both PUT and POST
+1 also running into a problem related to this.
Any update on this issue?
Fixed in #1170
It seems this patch isn't in 2.9.2. Can we get a quick build with this patch? @perwendel And thank you!
As the title said, calling request.body() may result in a NullPointerException.
This may be caused because there is no response handle if an error occurred during readBodyAsBytes(). So the response of bodyAsBytes() is null, then invoking bytes.length in String class throws a NPE.
Request
StringUtils
String
A way to reproduce the bug, is debugging the app with a breakpoint in the line
bodyAsBytes = IOUtils.toByteArray(servletRequest.getInputStream());
Then cancel the request, in order to produce an IOException. This makes bodyAsBytes null. I´ve used a JSON request of 1.5 MB