Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Is order matter in Cookies?

Reply
Thread Tools

Is order matter in Cookies?

 
 
jacksu
Guest
Posts: n/a
 
      07-21-2006
I have one application in two servers, two servers returns the same
cookie but with some elmenet in different order,

Set-cookie: a=abc; Path=/; Domain=.abc.com; Secure

another one is
Set-cookie: a=abc; Secure; Path=/ ;Domain=.abc.com

the later one will not be included in the Cookie list in the later
request. Does anyone knows whether the order of "secure" matter?

Thanks.

Here is the definition copied from RFC 2109.

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

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      07-21-2006
The "standard" order is :
Set-Cookie: NAME=VALUE; expires=DATE;
path=PATH; domain=DOMAIN_NAME; secure

If you don't set an expires date, the cookie doesn't persist.

Why are you setting cookies like that, instead of using Response.Cookies ?




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"jacksu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>I have one application in two servers, two servers returns the same
> cookie but with some elmenet in different order,
>
> Set-cookie: a=abc; Path=/; Domain=.abc.com; Secure
>
> another one is
> Set-cookie: a=abc; Secure; Path=/ ;Domain=.abc.com
>
> the later one will not be included in the Cookie list in the later
> request. Does anyone knows whether the order of "secure" matter?
>
> Thanks.
>
> Here is the definition copied from RFC 2109.
>
> 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
>



 
Reply With Quote
 
 
 
 
jacksu
Guest
Posts: n/a
 
      07-21-2006
It is not persistant cookie. We just used in the same session.

The questions is that if we put secure in the middle of cookie, then it
will not sent out by some software, like HttpUnit, but could be handled
by some browsers like IE and firefox.

Any suggestion?

Thanks.

Juan T. Llibre wrote:
> The "standard" order is :
> Set-Cookie: NAME=VALUE; expires=DATE;
> path=PATH; domain=DOMAIN_NAME; secure
>
> If you don't set an expires date, the cookie doesn't persist.
>
> Why are you setting cookies like that, instead of using Response.Cookies ?
>
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "jacksu" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
> >I have one application in two servers, two servers returns the same
> > cookie but with some elmenet in different order,
> >
> > Set-cookie: a=abc; Path=/; Domain=.abc.com; Secure
> >
> > another one is
> > Set-cookie: a=abc; Secure; Path=/ ;Domain=.abc.com
> >
> > the later one will not be included in the Cookie list in the later
> > request. Does anyone knows whether the order of "secure" matter?
> >
> > Thanks.
> >
> > Here is the definition copied from RFC 2109.
> >
> > 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
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
does the order of the attributes in the root element matter? hilz XML 1 01-18-2006 03:07 AM
Re: Does order of associative operators matter? pete C Programming 20 06-13-2005 06:47 AM
Whattsa Matter, Dark Matter?? A.Melon DVD Video 0 05-16-2004 07:05 AM
Multiple Inheritance - does order matter? Mark C++ 5 01-07-2004 06:51 AM
Re: Package creation: Why does order matter? SpaceCowboy Java 6 08-14-2003 05:44 PM



Advertisments