Is anyone capable of explaining ?

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

"Scherer, Bill" <Bill.Scherer at> wrote in message
news:mailman.1012997891.14129.python-list at
> 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:
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

Consulting, training, speaking:
Author, Python Web Programming:

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

More information about the Python-list mailing list