On Fri, Sep 02, 2005 at 07:57:53AM +0000, Samit Jain wrote: > Hi all, > > There is a small bug in the implementation of Cookie class. In > Cookie#equals(Object), domain matching should be case-insensitive. I think > it is a good idea to make this change in the Cookie class since it is a bug. > The other option is implementing Cookie2#equals(Object) so this bug won't > appear in RFC 2965 implementation. > > Whats your opinion on this? > > -Samit
Hi Samit, Technically speaking this is not a bug. The Cookie class always converts domain attributes to low caps: http://jakarta.apache.org/commons/httpclient/xref/org/apache/commons/httpclient/Cookie.html#233 so, the case sensitive comparison of domain attributes is okay. However, I do think that cookies should not be compared using the Object#equals method because the concept of cookie equality can be cookie spec specific. The cookie spec interface should be extended to provide a means to compare cookies in the context of the given spec. That brings me to another topic I wanted to discuss with you. I'll start a new thread in a minute Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
