dsmiley commented on code in PR #3323:
URL: https://github.com/apache/solr/pull/3323#discussion_r2041235293


##########
solr/core/src/java/org/apache/solr/servlet/ServletUtils.java:
##########
@@ -252,8 +253,11 @@ private static void traceHttpRequestExecution2(
   static void consumeInputFully(HttpServletRequest req, HttpServletResponse 
response) {
     try {
       ServletInputStream is = req.getInputStream();
-      //noinspection StatementWithEmptyBody
-      while (!is.isFinished() && is.read() != -1) {}
+      if (!is.isFinished() && is.read() != -1) {

Review Comment:
   even the read here isn't needed, technically, but it's super common for an 
InputStream to not be finished yet the read is EOF.  skipNBytes allocates a 2k 
array so we can avoid that typically.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to