Hi,

looks like there is at least one bug. It should work like you expect but it 
doesn't.

The reason is, that the set-cookie header is wrong in tntnet. The spec 
(http://www.ietf.org/rfc/rfc2109.txt) is somewhat unclear to me. It says:
   set-cookie      =       "Set-Cookie:" cookies
   cookies         =       1#cookie
   cookie          =       NAME "=" VALUE *(";" cookie-av)
   NAME            =       attr
   VALUE           =       value
   cookie-av       =       "Comment" "=" value
                   |       "Domain" "=" value
                   |       "Max-Age" "=" value
                   |       "Path" "=" value
                   |       "Secure"
                   |       "Version" "=" 1*DIGIT

When I understand it correctly, "Set-Cookie:" is followed by one or more 
cookies. Until now tntnet separates the cookies by space. The spec tells, that 
the list is a comma-separated list. I put the comma here as a separator, but 
it does not work neither with firefox nor konqueror.

The set-cookie header looks like this (after my fix):

Set-Cookie: AnotherCookie=AnotherValue; Path=/; Version=1, 
SomeCookie=SomeValue; Path=/; Version=1

But it does not work :-(. It looks ok for me.

Any ideas?


Tommi


On Mittwoch, 28. Oktober 2009 18:18:19 Shadowcat wrote:
> Hi,
>
> I'm having a bit of an issue.  Any time I try to set two cookies in one
> function, only the one that's lowest in alphabetical order gets set.  It
> doesn't matter what order I put them in in the code, only the one gets
> set.  For example:
>
> reply.setCookie( "SomeCookie", "SomeValue" );
> reply.setCookie( "AnotherCookie", "AnotherValue" );
>
> Only "AnotherCookie" will be set.  If I switch the order, it's still
> "AnotherCookie" that gets set.  But if I were to change its name to
> "ZomgACookie!", then "SomeCookie" would be the one that gets set.
>
> How can I get both of them set?
>
> ---------------------------------------------------------------------------
>--- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is
> the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Tntnet-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tntnet-general


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to