You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2007/08/13 12:07:44 UTC

[jira] Resolved: (HTTPCLIENT-683) SSL with Client- and Servercertificates not working

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

Oleg Kalnichevski resolved HTTPCLIENT-683.
------------------------------------------

    Resolution: Won't Fix

This issue has been beaten to death on more then one occasion. When using a custom HostConfiguration always make sure to use _relative_ request URIs. For a workaround see HTTPCLIENT-634

Oleg 

> SSL with Client- and Servercertificates not working
> ---------------------------------------------------
>
>                 Key: HTTPCLIENT-683
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-683
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Contrib, HttpClient
>    Affects Versions: 3.0.1
>            Reporter: Wolfgang Winter
>            Priority: Critical
>
> I informed about this bug already some releases before but at least in the 3.01 release it is still not resolved. Here it is again: SSL with the contrib package with Client- and Servercertificates is not working and throws an Exception, I don't remember which one. This is due to a bug in the HttpClient class. I patched the code as following:
>     public int executeMethod(HostConfiguration hostconfig, 
>         final HttpMethod method, final HttpState state)
>         throws IOException, HttpException  {
>             
>         LOG.trace("enter HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)");
>         if (method == null) {
>             throw new IllegalArgumentException("HttpMethod parameter may not be null");
>         }
>         HostConfiguration defaulthostconfig = getHostConfiguration();
>         if (hostconfig == null) {
>             hostconfig = defaulthostconfig;
>         }
>         URI uri = method.getURI(); 
>         if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) {
>             // make a deep copy of the host defaults
>             hostconfig = new HostConfiguration(hostconfig);
>             if (hostconfig.getHost() == null && uri.isAbsoluteURI()) {
>                 hostconfig.setHost(uri);
>             }
>         }
>         
>         HttpMethodDirector methodDirector = new HttpMethodDirector(
>                 getHttpConnectionManager(),
>                 hostconfig,
>                 this.params,
>                 (state == null ? getState() : state));
>         methodDirector.executeMethod(method);
>         return method.getStatusCode();
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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