hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-946) Documentation Bug in SSL Guide
Date Fri, 28 May 2010 10:25:36 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872922#action_12872922

Oleg Kalnichevski commented on HTTPCLIENT-946:

> And this assumption is based on code review or are you just guessing?

I do have to make guesses once so often. In this particular case I am pretty sure as I know
the intention behind the API.

'myhttps' represents a virtual scheme used internally by  Httpclient. 'https' is the 'real'
protocol scheme which is used when constructing request URIs.

> A great number of people (including me) cannot switch to client 4.x because they need
to have a very small dependency footprint. 

This is nonsense. HttpClient 4.0 and HttpClient 3.1 share the same set of dependencies: commons-logging
and commons-codec. The only difference is that in the 4.x branch core components are packaged
as a separately versioned module called HttpCore. One of the reasons why it was done that
way is dependency management. Those users who need only basic HTTP transport can use HttpCore
without any extra dependencies. 


> Documentation Bug in SSL Guide
> ------------------------------
>                 Key: HTTPCLIENT-946
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-946
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 3.1 Final
>            Reporter: Andreas Sahlbach
> In the SSL Guide for commons-httpclient-3.x you can find the following section:
> -----
> {noformat} 
> Finally, you can register your custom protocol as the default handler for a specific
protocol designator (eg: https) by calling the Protocol.registerProtocol method. You can specify
your own protocol designator (such as 'myhttps') if you need to use your custom protocol as
well as the default SSL protocol implementation.
> {noformat}
> {code:java}
> Protocol.registerProtocol("myhttps", 
> new Protocol("https", new MySSLSocketFactory(), 9443));
> {code}
> -----
> IMHO the first Parameter in the Protocol constructor must be "myhttps", too. At least
here only in this case the new Protocol is found and the MySSLSocketFactory is actually used.
The original code only seems to work, because the register call doesn't fail, but the normal
SSL Protocol object is actually used.
> PS: hope this confluence format stuff actually works. 

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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message