[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226470#comment-17226470
 ] 

koji lin commented on HTTPCLIENT-2126:
--------------------------------------

Hi the test code is at 
[https://github.com/kojilin/test-http-client5/blob/main/src/test/java/HttpClientTest.java]

I made HttpAsync, H2Async, CachingAsync. There is a little different behavior 
like h2 has null body, and cachingH2 may trigger NPE at `failed`.

Also client builder's `addExecInterceptorBefore` has lazy execInterceptors 
init, but addExecInterceptorFirst&addExecInterceptorLast doesn't.

> AsyncCachingExec throws NPE when response body is null
> ------------------------------------------------------
>
>                 Key: HTTPCLIENT-2126
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2126
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (async)
>    Affects Versions: 5.0.3
>            Reporter: koji lin
>            Priority: Minor
>             Fix For: 5.0.4
>
>
> [https://github.com/apache/httpcomponents-client/blob/master/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java#L160]
>  
> This makes client's returned future/callback 
> susccess(AsyncExecCallback#handleResponse triggers this?) but 
> AsyncResponseConsumer/AsyncExecCallback failed.
>  
> Curious if it should avoid exception here.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to