New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-14457: Fix closing of malformed GZIPInputStream #283
Conversation
solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpClientUtilTest.java
Outdated
Show resolved
Hide resolved
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
Show resolved
Hide resolved
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
Show resolved
Hide resolved
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
Outdated
Show resolved
Hide resolved
Sorry for joining late to the PR but I think that removing the interceptor entirely would be a better solution. The current HTTP Client version handles the compression itself when the right headers are present in the response, handling also the errors properly. What do you think if I open a new improvement issue to remove that piece of code completely? (less code to maintain 😀) |
@samuelgmartinez , Thanks for the input! I think that would be great to go as a new improvement ticket, and we will probably shoot for 9.0 (not 8.x) if we decide to go that direction. |
https://issues.apache.org/jira/browse/SOLR-14457
Cleaned up the way that
GZIPInputStream
objects are created, since I think the current manner doesn't work whenGzipDecompressingEntity.getContent()
is called multiple times after having read parts of the data.I plan on adding a test before committing.