You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Jon Moore (JIRA)" <ji...@apache.org> on 2012/05/30 20:10:23 UTC

[jira] [Updated] (HTTPCLIENT-1198) HttpHost is not set in HttpContext in CachingHttpClient

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

Jon Moore updated HTTPCLIENT-1198:
----------------------------------

          Component/s: Cache
    Affects Version/s: 4.1.3
        Fix Version/s: 4.2.1

Right, the CachingHttpClient relies on the "backend" client to fill these parts of the HttpContext out. When the CachingHttpClient serves a response out of cache, they don't get set, however. It should be possible to set some (but not all) of the usual HttpContext variables. For example, we can't set HTTP_CONNECTION or HTTP_PROXY_HOST on a cache hit.

                
> HttpHost is not set in HttpContext in CachingHttpClient
> -------------------------------------------------------
>
>                 Key: HTTPCLIENT-1198
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1198
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache, HttpClient
>    Affects Versions: 4.1.3, 4.2 Final
>            Reporter: Ilirjan Papa
>            Priority: Critical
>             Fix For: 4.2.1
>
>
> The HttpHost cames back as null, causing a NullPointerException when using CachingHttpClient.
> HttpHost actualHost = (HttpHost)requestContext.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
> The host should be set in the HttpContext.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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