[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-1823.
-------------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 5.0)
                   5.0 Alpha2

Async message entity content manipulation should be possible as of 5.0a2. See 
examples:  

https://github.com/apache/httpclient/blob/trunk/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java
https://github.com/apache/httpclient/blob/trunk/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java

Oleg

> HttpRequestInterceptor and HttpResponseInterceptor don't allow entity 
> manipulation
> ----------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1823
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1823
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>            Reporter: Sven Zethelius
>             Fix For: 5.0 Alpha2
>
>
> Examples show how to do GZIP compression in sync HttpClient ( 
> https://hc.apache.org/httpcomponents-client-4.2.x/httpclient/examples/org/apache/http/examples/client/ClientGZipContentCompression.java),
>  but even thought AsyncHttpClient supports registering the same 
> HttpRequestInterceptor and HttpResponseInterceptor they can only modify the 
> headers.  Doing any modification of the entity, which is necessary to do 
> compression ends up being ignored.  
> In HttpRequestInterceptor, this is because A) BasicAsyncRequestProducer is 
> registerd early in the lifecycle with a reference to the original request 
> entity which it uses to write the content.  B) The wrapping request entity 
> passed to the interceptor doesn't pass calls to setEntity back to the request 
> it's wrapping.
> In HttpResponseInterceptor, the entity of the HttpResponse is bypassed 
> completely by BasicAsyncResponseConsumer.
> This means clients of AsyncHttpClient have no way to intercept the message.
> My request is that there needs to be a way to intercept and manipulate the 
> request bytes in/out so that compression can be implemented.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to