quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: cvs commit: httpd-python/test/htdocs tests.py
Date Tue, 24 Jun 2003 14:19:51 GMT

On Mon, 23 Jun 2003, Greg Stein wrote:

> >   +        conn.putheader("Host", "test_Cookie_Cookie:%s" % PORT)
> >   +        conn.putheader("Cookie", "spam=foo; path=blah;;eggs=bar;")
> >   +        conn.putheader("Cookie", "bar=foo")
> >   +        conn.endheaders()
>
> And to write this as:
>
>   conn.request('GET', '/testz.py', headers={
>     'Host' : 'test_Cookie_Cookie:%s' % PORT,
>     'Cookie' : ...
>     })

Interesting -I was using putheader() because of the "host:" header if I
remember it correctly, I wonder if I overlooked it or conn.request()
started paying attention to the "host" only later (looks like 2.2.1 based
on cvs info...)

But in this particular case I wanted two "Cookie" headers to add to the
confusion. It was worth it, because I learned in the process that httpd
comma-joins them into one.

Which, as a side note, is perfectly RFC compliant, but demonstrates a flaw
in the Netscape spec because they specify a date format for "expires"
which contains a comma, and is not quoted. But they wrote their spec
before RFC2616, so it's not their fault.

Overall, having been reading up on Cookies in the past two weeks, I must
say I am quite amazed at what a mess the current state of Cookie standards
really is and surprised that noone took the initiative to write about it
and start sorting it out... I think HTTP State could be a great subject
for someone to study as "Standardization gone wrong".

Grisha

Mime
View raw message