[HTTPCLIENT-1843] - Delegate compression handling to Apache Commons Compress
This PR addresses HTTPCLIENT-1843, allowing Apache HttpClient to delegate compression handling to Apache Commons Compress. The goal is to provide broader support for various compression algorithms while reducing custom implementation and maintenance.
1.27.1
changed.
HI @garydgregory Please do another pass. TY
Thank you for your update.
* I have comments embedded throughout. * There is some lazy-initialization code here and there, this should be called out in the class Javadoc making the class thread-unsafe, we have an annotation for that: `org.apache.hc.core5.annotation.ThreadingBehavior`.
HI @garydgregory I believe I’ve covered all the changes you requested. TY
Hi @arturobernalg
I git-hub resolved most of the comment I wrote. I think we should consistently name ALL our new classes either with or without the "ing" word part, either
[Compress|Decompress]Entityor[Compressing|Decompressing]Entity. I think "ing" is better and in keeping with our existing otherHttpEntityimplementations likeIncomingHttpEntityandDecompressingEntity(conflicting). I also think that all this new compression/decompression code should live in its own package, maybeorg.apache.hc.client5.http.entity.compress.
Please @garydgregory take another look.
Hi @arturobernalg
* TY for the work 👍 * Minor: For the Javadoc `since` tags, I think the next feature release will be `5.5` since the current release is `5.4.1` and the git master POM already has 5.5 in it. * Side note: In Commons Compress, `CompressorException` usually wraps an `IOException`, so it's too bad that we wrap it in another IOException here ;-) Since compression and decompression is IO, I'll see about making CompressorException extend IOException.
Hi @garydgregory ,
Thanks for the feedback!. I've updated all the @since tags to reflect version 5.5 as suggested. Regarding the `CompressorException` wrapping `IOException`, I’ll wait for updates on whether it will extend IOException in Commons Compress. This will determine the best course of action here.
Let me know if there’s anything else to address.
Hi @arturobernalg,
What do you think about https://github.com/apache/commons-compress/pull/605
Hi @arturobernalg,
What do you think about apache/commons-compress#605
Hi @arturobernalg,
What do you think about apache/commons-compress#605
Hi @garydgregory The changes make sense. Thank you.
@arturobernalg
Thank you for the review on https://github.com/apache/commons-compress/pull/605, I merged that PR.
@arturobernalg
Thank you for the review on apache/commons-compress#605, I merged that PR.
All right. Let me know if we need to do another change.
Hi @garydgregory , do I need to do anything else for PR #580? Any timing to validate it? Thanks!
@ok2c would you mind to validate this PR.
@ok2c would you mind to validate this PR.
@arturobernalg Sure. Will do.