httpcomponents-client icon indicating copy to clipboard operation
httpcomponents-client copied to clipboard

[HTTPCLIENT-1843] - Delegate compression handling to Apache Commons Compress

Open arturobernalg opened this issue 1 year ago • 12 comments

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.

arturobernalg avatar Sep 19 '24 20:09 arturobernalg

1.27.1

changed.

arturobernalg avatar Sep 19 '24 20:09 arturobernalg

HI @garydgregory Please do another pass. TY

arturobernalg avatar Sep 20 '24 20:09 arturobernalg

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

arturobernalg avatar Sep 21 '24 07:09 arturobernalg

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]Entity or [Compressing|Decompressing]Entity. I think "ing" is better and in keeping with our existing other HttpEntity implementations like IncomingHttpEntity and DecompressingEntity (conflicting). I also think that all this new compression/decompression code should live in its own package, maybe org.apache.hc.client5.http.entity.compress.

Please @garydgregory take another look.

arturobernalg avatar Oct 21 '24 19:10 arturobernalg

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.

arturobernalg avatar Nov 15 '24 20:11 arturobernalg

Hi @arturobernalg,

What do you think about https://github.com/apache/commons-compress/pull/605

garydgregory avatar Nov 16 '24 02:11 garydgregory

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 avatar Nov 16 '24 12:11 arturobernalg

@arturobernalg

Thank you for the review on https://github.com/apache/commons-compress/pull/605, I merged that PR.

garydgregory avatar Nov 16 '24 13:11 garydgregory

@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.

arturobernalg avatar Nov 18 '24 07:11 arturobernalg

Hi @garydgregory , do I need to do anything else for PR #580? Any timing to validate it? Thanks!

arturobernalg avatar Mar 17 '25 17:03 arturobernalg

@ok2c would you mind to validate this PR.

arturobernalg avatar May 02 '25 17:05 arturobernalg

@ok2c would you mind to validate this PR.

@arturobernalg Sure. Will do.

ok2c avatar May 03 '25 10:05 ok2c