Is anyone capable of explaining ?

Steve Holden sholden at holdenweb.com
Thu Feb 7 10:12:04 EST 2002


"Scherer, Bill" <Bill.Scherer at VerizonWireless.com> wrote in message
news:mailman.1012997891.14129.python-list at python.org...
> On Tue, 5 Feb 2002, A wrote:
>
> >
> > Can anybody please answer the following question?
> >
> > Question: How does web browser know what cookies should be
> > sent to server as a response?
>
> The browser determines which cookies to include with a request by
> comparing the domain of the server it is about to contact with
> the domain of the cookies.   I didn't see any domain in the
> cookies you are setting; there should be one.
>
> The template http cookie header:
>
> Set-Cookie: name=value; expires=date; path=pathname; domain=domainname
>
> See:
> http://www.webreference.com/js/column8/http.html
>
Let's not forget that the browser will also be doing path comparisons. In
general a server can issue a cookie that applies to any subset of

a) the server's domain or a subdomain
b) a subset of all possible paths

regards
 Steve
--
Consulting, training, speaking: http://www.holdenweb.com/
Author, Python Web Programming: http://pydish.holdenweb.com/pwp/

"This is Python.  We don't care much about theory, except where it
intersects with useful practice."  Aahz Maruch on c.l.py







More information about the Python-list mailing list