You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Marc Saegesser <Ma...@apropos.com> on 2002/02/21 18:22:30 UTC
[httpclient] Sorted cookie patch broken
The recent patch to sort the cookies in the Cookie header according to path
(per RFC 2109/4.3.4) is broken and results in some cookies not being sent
back to the server. The problem is that SortedMap uses compare() to test
for equality instead of calling equals(). Since the Cookie.compare() method
is based solely on the cookie path, any two cookies with the same path
appear to be equal and thus only one will actually be added to the set.
I discovered the problem while merging in my HttpMultiClient code so I'll
fix while I'm making those changes. I just wanted to post a note here in
case anyone else starts having problems with it until I get my changes
committed.
Marc Saegesser
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [httpclient] Sorted cookie patch broken
Posted by dIon Gillard <di...@multitask.com.au>.
Marc Saegesser wrote:
>The recent patch to sort the cookies in the Cookie header according to path
>(per RFC 2109/4.3.4) is broken and results in some cookies not being sent
>back to the server. The problem is that SortedMap uses compare() to test
>for equality instead of calling equals(). Since the Cookie.compare() method
>is based solely on the cookie path, any two cookies with the same path
>appear to be equal and thus only one will actually be added to the set.
>
>I discovered the problem while merging in my HttpMultiClient code so I'll
>fix while I'm making those changes. I just wanted to post a note here in
>case anyone else starts having problems with it until I get my changes
>committed.
>
Marc,
can you fix the test for the comparator as well? That passed no problems
last time I ran them, so that's an issue as well.
--
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>