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/12 00:18:39 UTC

[jira] [Created] (HTTPASYNC-101) CachingHttpAsyncClient doesn't create HttpContext

Brian Chang created HTTPASYNC-101:
-------------------------------------

             Summary: 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


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