Skip to content

Commit

Permalink
workaround for removing headers
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsanjay committed Nov 28, 2024
1 parent 9634c1c commit fa2c41e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion solr/core/src/java/org/apache/solr/api/V2HttpCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ protected void executeCoreRequest(SolrQueryResponse rsp) {
// SolrCore counter
core.close();
core = null;
response.getHeaderNames().stream().forEach(name -> response.setHeader(name, null));
// Skip specific headers
// workaround for response.setHeader(name, null)
response.getHeaderNames().stream()
.filter(name -> !name.equalsIgnoreCase("Content-Length"))
.forEach(name -> response.setHeader(name, ""));
response.setContentLength(-1);
invokeJerseyRequest(
cores, null, cores.getJerseyApplicationHandler(), cores.getRequestHandlers(), rsp);
}
Expand Down

0 comments on commit fa2c41e

Please sign in to comment.