Discussion:
Async client and gzip request : UnsupportedOperationException
Gabriel Landais
2018-07-19 11:55:25 UTC
Permalink
Hi,
my scenario :

1. create an entity with an EntityBuilder and use EntityBuilder.gzipCompress()
(it will create a GzipCompressingEntity)
2. set entity on a compatible HttpUriRequest (HttpPost for instance)
3. execute this request on a HttpAsyncClient
4. EntityAsyncContentProducer.produceContent calls getContent() on entity
5. GzipCompressingEntity.getContent() throws UnsupportedOperationException

Two questions :

1. Why GzipCompressingEntity.getContent doesn't simply return new
GZIPInputStream(wrappedEntity.getContent())?
2. Sould I open a bug for this or I missed something?

Thanks!
Gabriel
Oleg Kalnichevski
2018-07-19 13:24:28 UTC
Permalink
Post by Gabriel Landais
Hi,
1. create an entity with an EntityBuilder and use
EntityBuilder.gzipCompress()
(it will create a GzipCompressingEntity)
2. set entity on a compatible HttpUriRequest (HttpPost for instance)
3. execute this request on a HttpAsyncClient
4. EntityAsyncContentProducer.produceContent calls getContent() on entity
5. GzipCompressingEntity.getContent() throws
UnsupportedOperationException
1. Why GzipCompressingEntity.getContent doesn't simply return new
GZIPInputStream(wrappedEntity.getContent())?
2. Sould I open a bug for this or I missed something?
Thanks!
Gabriel
Gabriel

HttpAsyncClient 4.1 and 5.0 do not support automatic content
compression / decompression. This feature is supported by classic
(blocking) i/o only.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Loading...