hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: [PATCH] Cookie default version fix, Cookie.parse() method refactored
Date Fri, 29 Nov 2002 19:20:08 GMT
Jeff, 

You now what? At times I can't help thinking that logging at the DEBUG verbosity currently
is next to being absolutely useless. 

I'll happily reduce the noise the Cookie class produces, if nobody objects. I was afraid I
was already too liberal about changing stuff. Just let me know

Cheers

Oleg

-----Original Message-----
From: Jeffrey Dever [mailto:jsdever@sympatico.ca]
Sent: Friday, November 29, 2002 8:04 PM
To: Commons HttpClient Project
Subject: Re: [PATCH] Cookie default version fix, Cookie.parse() method refactored


Committed.  Factoring looks good.  Still a bit verbose on logging, but 
an improvement.

-jsd

Kalnichevski, Oleg wrote:

>Changes:
>
>1) This patch fixes the problem of Cookie class assuming Netscape cookie format per default.
With this fix RFC 2109 compliant validation applies unless the cookie version is explicitly
set to 0 (Netscape cookie draft)
>
>2) I have also taken liberty in heavily refactoring the Cookie.parse() method 
>- I have tried to restructure the code by separating parsing and validation processes.
The code is a bit more modular now
>- I have improved (or so I'd like to hope) exception handling and logging, which was next
to awful, at least in my humble opinion. Stuff should be more consistent now
>- The code should have gotten somewhat cleaner. (Code clarity is a subjective matter,
though, so critique is always welcome)
>
>All unit tests run fine, however I sense more testing may be needed. 
>
>Let me know what you think
>
>Oleg
>
>
>
>
>
>
>-----Original Message-----
>From: Oleg Kalnichevski [mailto:o.kalnichevski@dplanet.ch]
>Sent: Thursday, November 28, 2002 22:03
>To: Commons HttpClient Project
>Subject: Re: Special domains as defined by Netscape do not seem to
>make much sense (Cookies of all countries, unite!!!)
>
>
>Brett,
>You are absolutely right. Cookies with version attribute set to 0 should
>still be treated in accordance with the Netscape's draft. The problem is
>that currently the HttpClient assumes cookie version 0 per default. That
>is the cause of the problem. I believe unless version 0 is explicitly
>specified cookie format should be assumed conforming to the RFC 2109.
>That's it. That will solve the problem. Anyone sees that differently?
>
>Oleg
>
>
>On Thu, 2002-11-28 at 20:30, Brett Knights wrote:
>  
>
>>>From: "Danny Burkes" <dburkes@netable.com>
>>>It seems clear to me that HttpClient should conform to RFC2109,
>>>      
>>>
>>which
>>    
>>
>>>superceded Netscape's draft.  Section 4.3.2 of RFC2109 clearly lays
>>>      
>>>
>>out the
>>    
>>
>>>rules of cookie rejection, and HttpClient should implement to those
>>>      
>>>
>>rules.
>>    
>>
>>>IMHO, Netscape's draft is just some old cruft, and you shouldn't
>>>      
>>>
>>worry about
>>    
>>
>>>it.  Stick to the RFC.
>>>      
>>>
>>I haven't read the whole of rfc2109 but it does say that cookies
>>complying with it are version 1 cookies and should contain a version
>>field identifying it as such.
>>
>>The netscape spec is for version 0 cookies.
>>
>>If rfc 2109 is a cleaned up superset of the netscape spec then by all
>>means ignore the netscape spec.
>>If, however, the netscape spec defines different behaviour then you
>>should still conform to the netscape spec for version 0 cookies except
>>in the case where it is clearly wrong or doesn't reflect a commonly
>>accepted practise (the case here)
>>
>>
>>
>>--
>>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>
>>    
>>
>>------------------------------------------------------------------------
>>
>>--
>>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>
>>


--
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