You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Brian Chang (JIRA)" <ji...@apache.org> on 2016/01/15 19:07:39 UTC
[jira] [Commented] (HTTPASYNC-101) CachingHttpAsyncClient doesn't
create HttpContext
[ https://issues.apache.org/jira/browse/HTTPASYNC-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15102210#comment-15102210 ]
Brian Chang commented on HTTPASYNC-101:
---------------------------------------
Thanks for the quick turnaround!
> CachingHttpAsyncClient doesn't create HttpContext
> -------------------------------------------------
>
> Key: HTTPASYNC-101
> URL: https://issues.apache.org/jira/browse/HTTPASYNC-101
> Project: HttpComponents HttpAsyncClient
> Issue Type: Bug
> Affects Versions: 4.1.1
> Reporter: Brian Chang
> Fix For: 4.1.2
>
>
> In the below example, execute is being called with a {{HttpContext}} of null. This has been causing me issues further down the line in Apache code.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.httpcomponents/httpasyncclient-cache/4.1/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java/#253
> {code}
> 248 @Override
> 249 public <T> Future<T> execute(
> 250 final HttpAsyncRequestProducer requestProducer,
> 251 final HttpAsyncResponseConsumer<T> responseConsumer,
> 252 final FutureCallback<T> callback) {
> 253 return execute(requestProducer, responseConsumer, null, callback);
> 254 }
> {code}
> In the abstract implementation, {{new BasicHttpContext()}} is used.
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.httpcomponents/httpasyncclient/4.1/org/apache/http/impl/nio/client/AbstractHttpAsyncClient.java#552
> {code}
> 547 @Override
> 548 public <T> Future<T> More ...execute(
> 549 final HttpAsyncRequestProducer requestProducer,
> 550 final HttpAsyncResponseConsumer<T> responseConsumer,
> 551 final FutureCallback<T> callback) {
> 552 return execute(requestProducer, responseConsumer, new BasicHttpContext(), callback);
> 553 }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org