You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by sa...@totalsync.com on 2001/01/03 23:28:00 UTC

Problem with Microsoft Cookies

I am using the Slide clent library to talk to IIS 5.0.  I try to do 
a "cd /folder1/folder2/" in the command-line client, and it gives me an 
NPE.  I've tracked it down to the Cookie handler, but I do not understand 
what is going on.

The cookie Header that it sent to me looks like:
Set-Cookie: sessionid=ed91fc85-4b03-41e8-8fae-988908a8b4b4,0x0; 
path=/folder1/folder2

I believe that it is choking on the ",0x0;" portion, but I am not sure.  
Any ideas?

Scott Sanders



Re: Problem with Microsoft Cookies

Posted by "B.C. Holmes" <bc...@roxton.com>.
satan@totalsync.com wrote:
> 
> I am using the Slide clent library to talk to IIS 5.0.  I try to do
> a "cd /folder1/folder2/" in the command-line client, and it gives me an
> NPE.  I've tracked it down to the Cookie handler, but I do not understand
> what is going on.
>
> The cookie Header that it sent to me looks like:
> Set-Cookie: sessionid=ed91fc85-4b03-41e8-8fae-988908a8b4b4,0x0;
> path=/folder1/folder2
> 
> I believe that it is choking on the ",0x0;" portion, but I am not sure.
> Any ideas?
 
     You're almost certainly correct about it choking there, as I
believe that the Set-Cookie header violates the spec.  A cookie isn't
supposed to contain a "," because the comma is used as the separator
between different cookies.  Thus, the code thinks that 0x0 is the name
of a cookie, and is probably throwing a NullPointerException because
that cookie has no value.  (Yeah, at the very least, it should throw a
WebdavException indicating that the cookie is badly formatted).

     So, if my recollection of the spec is correct, then it's not
going to be easy to fix this.  But IIS is too significant a server to
ignore.  Hurm...

     Unfortunately, I won't have a chance to post a fix before this
evening.

BCing you
-- 
B.C. Holmes             \u2625               http://www.bcholmes.org/
"What makes the hottentot so hot?  Who put the ape in apricot?
 Whadda they got that I ain't got?"
           - The Cowardly Lion, _The Wizard of Oz_