You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Michael Becke <be...@u.washington.edu> on 2002/12/15 16:29:47 UTC
[PATCH] Protocol take 3
Oops. Let's try this again with the patch:)
Mike
Re: [PATCH] Protocol take 3
Posted by Michael Becke <be...@u.washington.edu>.
Nice catch. Thank you for fixing that for me.
Mike
On Sunday, December 15, 2002, at 10:51 PM, Jeffrey Dever wrote:
> 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:
>>>> <ma...@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>
>>> --
>>> Oleg Kalnichevski <o....@dplanet.ch>
>>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
Re: [PATCH] Protocol take 3
Posted by Jeffrey Dever <js...@sympatico.ca>.
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:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>
>> --
>> Oleg Kalnichevski <o....@dplanet.ch>
>>
>
>------------------------------------------------------------------------
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
Re: [PATCH] Protocol take 3
Posted by Oleg Kalnichevski <o....@dplanet.ch>.
Mike,
As far as I can judge the patch is good to be merged into the CVS truck.
Great work.
Cheers
Oleg
On Sun, 2002-12-15 at 16:29, 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:
> >> <ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> >> <ma...@jakarta.apache.org>
> > --
> > Oleg Kalnichevski <o....@dplanet.ch>
> >
>
>
> ______________________________________________________________________
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Oleg Kalnichevski <o....@dplanet.ch>