hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Chang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPASYNC-101) CachingHttpAsyncClient doesn't create HttpContext
Date Mon, 11 Jan 2016 23:18:39 GMT
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


Mime
View raw message