hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Dever <jsde...@sympatico.ca>
Subject Re: [PATCH] Protocol take 3
Date Mon, 16 Dec 2002 03:51:25 GMT
One subtle problem with this patch.  HttpClient is ment to require the 
ssl libraries at compile time, but should not have this dependancy at 
run time unless https is actually used.  As the https Protocol handler 
was instantiated in a static block, this implicit dependancy was broken.

I removed the static initializations to be done lazy when the protocol 
is requested with getProtocol().  It was not strictly necessisary to do 
this for the http protocol, but I put them together into a new private 
method lazyRegisterProtocol(id).

I submitted your patch with that minor addition.  Hope this is ok!

BTW: I really like this new Protocol class, much nicer and more scalable 
than
isSecure ? "https" : "http" <grin>

-jsd


Michael Becke wrote:

> Oops.  Let's try this again with the patch:)
>
> Mike
>
>
>
> On Sunday, December 15, 2002, at 06:13 AM, Oleg Kalnichevski wrote:
>
>> Mike,
>> I am afraid you forgot to attach the patch in your posting
>> Oleg
>>
>> On Sun, 2002-12-15 at 04:27, Michael Becke wrote:
>>
>>> Attached is the second take of the protocol change.  Here's what's new
>>> in this one:
>>>
>>> - ProtocolManager has been removed and all related code has been moved
>>> into Protocol
>>> - Protocol.toString() has been added
>>> - Protocol.getPort() has been renamed to Protocol.getDefaultPort()
>>> - HttpMethodBase.addHostRequestHeader() has been modified to take
>>> advantage of the Protocol class
>>> - Protocol.resolvePort() has been added to handle the "port <= 0 ?
>>> protocol.getPort() : port" case
>>> - javadocs have been added
>>>
>>> Thanks again to Eric and Oleg for their feedback.
>>>
>>> Enjoy
>>>
>>> Mike
>>>
>>>
>>> -- 
>>> To unsubscribe, e-mail:   
>>> <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail: 
>>> <mailto:commons-httpclient-dev-help@jakarta.apache.org>
>>
>> -- 
>> Oleg Kalnichevski <o.kalnichevski@dplanet.ch>
>>
>
>------------------------------------------------------------------------
>
>--
>To unsubscribe, e-mail:   <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:commons-httpclient-dev-help@jakarta.apache.org>
>


Mime
View raw message