hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Sahlbach (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (HTTPCLIENT-946) Documentation Bug in SSL Guide
Date Thu, 27 May 2010 22:09:40 GMT

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

Andreas Sahlbach edited comment on HTTPCLIENT-946 at 5/27/10 6:07 PM:
----------------------------------------------------------------------

And this assumption is based on code review or are you just guessing? I checked the code and
I have a working program here, that works as I wrote but fails to work as the documentation
says. 

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

Well, I did my best. Maybe the next guy who walks into this documentation trap will read at
least this report.

      was (Author: thecoolace):
    And this assumption is based on code review or are you just guessing? I checked the code
and I have a working program here, that works as I wrote but fails to work as the documentation
says. 

A great number of people (including me) cannot switch to client 4.x because they have to be
java 1.4 compatible. Fixing this documentation would be very easy, but who cares, eh? 

Well, I did my best. Maybe the next guy who walks into this documentation trap will read at
least this report.
  
> 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


Mime
View raw message