Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-8453: Only consume input here if exp != null, otherwise it is done in writeResponse.

Mark Robert Millerbff4ab0cd995
diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index 0c24abc81c8..837eb16073e 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -623,19 +623,19 @@ public class HttpSolrCall {
exp = e;
} finally {
try {
- try {
- if (exp != null) {
+ if (exp != null) {
+ try {
SimpleOrderedMap info = new SimpleOrderedMap();
int code = ResponseUtils.getErrorInfo(ex, info, log);
sendError(code, info.toString());
- }
- } finally {
- if (core == null && localCore != null) {
- localCore.close();
+ } finally {
+ consumeInput(req);
}
}
} finally {
- consumeInput(req);
+ if (core == null && localCore != null) {
+ localCore.close();
+ }
}
}
}