Re: Async client and gzip request : UnsupportedOperationException

2018-07-19 Thread Oleg Kalnichevski
On Thu, 2018-07-19 at 13:55 +0200, Gabriel Landais wrote:
> 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

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-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Async client and gzip request : UnsupportedOperationException

2018-07-19 Thread Gabriel Landais
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