[
https://issues.apache.org/jira/browse/HTTPCLIENT-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17034441#comment-17034441
]
Oleg Kalnichevski commented on HTTPCLIENT-1822:
-----------------------------------------------
[~Retardust] What you likely need to do is as follows:
# Build a custom {{AsyncDataConsumer}} that can transparently decompress data
and pass it for further processing to another {{AsyncDataConsumer}}
# Build a custom {{AsyncDataProducer}} that can transparently compress data
produced by another {{AsyncDataProducer}} and commit in to the underlying
{{DataStreamChannel}}.
# Build a custom {{ExecResponseInterceptor}} that automatically injects
compressing / decompressing data producer / consumer into the request execution
pipeline depending on request / response message composition or {{HttpContext}}
state.
Hope this helps
Oleg
> Support for transparent content decompression
> ---------------------------------------------
>
> Key: HTTPCLIENT-1822
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1822
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Reporter: clajder
> Priority: Major
> Labels: decopression, httpprocessor, volunteers-wanted
> Fix For: 5.0
>
>
> Created http processor array like this
> HttpProcessor httpproc = HttpProcessorBuilder.create()
> .add(new RequestDefaultHeaders())
> .add(new RequestAcceptEncoding())
> .add(new RequestClientConnControl())
> .add(new RequestContent())
> .add(new ResponseContentEncoding())
> .add(new RequestTargetHost()).build();
>
> later http async client constructed as follows
> CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom()
> .setConnectionManager(connManager)
> .setHttpProcessor(httpproc)
> .setUserAgent(hc.getUserAgent())
> .setDefaultRequestConfig(defaultRequestConfig)
> .build();
> during invocation
> Future<HttpResponse> future = httpclient .execute(httpget, null);
> HttpResponse response = future.get();
> entity.getContent() is not decompressed (gzip), however
> ResponseContentEncoding http processor was executed
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]