[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473948
 ] 

John Kristian commented on HTTPCLIENT-634:
------------------------------------------

It seems better for users to subclass HostConfiguration, not subclass 
HttpClient.  It's less likely to lead to problems with two conflicting 
specializations of the same object.  Certainly I would prefer it.

Specifically, I mean change HttpClient.executeMethod to use 
'hostconfig.clone()' instead of 'new HostConfiguration(hostconfig)'.  That's 
enough, I think.  I don't see any need to move code into a new protected 
method.  Users could subclass HostConfiguration, overriding clone() and 
setHost(String, int, String), and install the specialized object via 
HttpClient.setHostConfiguration.

Shall I submit a patch?

> HostConfiguration socketFactory is ignored
> ------------------------------------------
>
>                 Key: HTTPCLIENT-634
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-634
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: Nightly Builds
>         Environment: Windows, Eclipse, Java 1.5
>            Reporter: John Kristian
>         Attachments: HostConfiguration.patch
>
>
> HostConfiguration doesn't use its host.protocol to execute an HttpMethod with 
> an absolute URL.  It should, if the Protocol's scheme is the same as the 
> method's URL scheme.
> This bug makes it difficult to integrate a specialized SSL connection 
> algorithm (in a SecureProtocolSocketFactory) with a module implemented on top 
> of HttpClient.  The latter module must not execute methods with absolute 
> URLs.  Of course, this is difficult when one doesn't control that module.  
> For example, I recently tried to integrate SSL certificate-based client 
> authentication with XFire.  XFire provides a reasonable API for replacing its 
> HttpClient, but one must hack its source code to prevent it from executing 
> methods with absolute URLs.
> Protocol.registerProtocol is a possible answer, but it can't support two or 
> more SSL connection algorithms for one HTTPS host and port.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to