Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
visonardo
Forum Contributor
Posts: 136 Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.
Post
by visonardo » Thu Dec 14, 2006 11:40 pm
there is some convention about the order that appear the field in set-cookie?
for example its from google
Code: Select all
Set-Cookie: PREF=ID=bd23b0a91a2fe443:TM=1166146444:LM=1166146444:S=IQAgNP7HITfub-x1; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
may be that appear first the path or domain or expires field?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Dec 15, 2006 8:05 am
I have no idea what you are asking.
visonardo
Forum Contributor
Posts: 136 Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.
Post
by visonardo » Fri Dec 15, 2006 8:54 am
if can appear thus:
Code: Select all
Set-Cookie: domain=blablablabla; name=value; path=/; expires=blablablabla
or
Code: Select all
Set-Cookie: path=/; domain=domain.com; expires=blablaballba; name=value
i ask about the order where appeaver cookie´s name=cookie´s value
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Dec 15, 2006 9:01 am
Have you tried it? Have you read the HTTP specification regarding the Set-Cookie directive? The latter will give you the definitive answer.
visonardo
Forum Contributor
Posts: 136 Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.
Post
by visonardo » Fri Dec 15, 2006 10:36 am
feyd wrote: Have you tried it? Have you read the HTTP specification regarding the Set-Cookie directive? The latter will give you the definitive answer.
yes, now i did
but by that i have this problem (to take the cookie´s name everywhere be)
viewtopic.php?t=60867
visonardo
Forum Contributor
Posts: 136 Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.
Post
by visonardo » Sat Dec 16, 2006 10:10 am
Thank
Other thing: here
Code: Select all
"foo=bar; bar=baz; path=/; domain=example.com; comment=; secure"
is the example that give php.net of string set-cookie header to use with http_parse_cookie, why appear two times a pair name=value? does it means that i can set two cookies of same atributes but different name-value at the same "set-cookie" ?
does it the same that:
"foo=bar; path=/; domain=example.com; comment=; secure"
and in other linke
"bar=baz; path=/; domain=example.com; comment=; secure" ?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Dec 16, 2006 10:56 am
You cannot set two cookies with the same header. Two cookies, two headers.
visonardo
Forum Contributor
Posts: 136 Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.
Post
by visonardo » Sat Dec 16, 2006 11:01 am
feyd wrote: You cannot set two cookies with the same header. Two cookies, two headers.
then why appear this "foo=bar; bar=baz;"
in the example of php.net what does it means?
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sat Dec 16, 2006 11:08 am
Probably a mix of the way cookies are sent back client->server
and Set-Cookie2
http://www.faqs.org/rfcs/rfc2965 wrote:Informally, the Set-Cookie2 response header comprises the token Set-
Cookie2:, followed by a comma-separated list of one or more cookies. Each cookie begins with a NAME=VALUE pair, followed by zero or more semi-colon-separated attribute-value pairs.
visonardo
Forum Contributor
Posts: 136 Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.
Post
by visonardo » Sat Dec 16, 2006 11:43 am
thank