On Fri, Aug 12, 2011 at 11:53 PM, Jack Hatterly
wrote:
> cookie['lastvisit']['path'] = '/cgi-bin/'
>
Yep, that's looking a lot more useful!
Glad it's working.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
Chris, I finally got a script that works. Thanks for trying!
Jack
#!/usr/bin/env python
import string
import os
import datetime, Cookie, random
import time
# The returned cookie is available in the os.environ dictionary
cookie_string = os.environ.get('HTTP_COOKIE')
if not cookie_string:
ourT
I think the best thing to do would be to look at the raw headers. If
you can't do that in your framework, then try this: set the cookie,
shut down your server, fire up a debugging HTTP server on the same
port, and then refresh the page. If your browser is sending the
cookie, you'll see it in the HT
> Date: Fri, 12 Aug 2011 21:29:25 +0100
> Subject: Re: Problem reading HTTP_COOKIE
> From: ros...@gmail.com
> To: python-list@python.org
>
> I assume that what you mean is that it prints "None" even after you
> hit F5 to reload the page, as the first run of the sc
On Fri, Aug 12, 2011 at 4:55 PM, Jack Hatterly wrote:
> It prints "None". However, when I look in my browser's cookie jar, there is
> a cookie "www.my_site.com" where my_site is the site from which I am surfing
> the above script. What gives?
>
I assume that what you mean is that it prints "None"
Hi;
I'm trying to get cookies to work and I've traced my problem down to this
reduced script:
#! /usr/bin/python
import string
import os
import datetime, Cookie, random
import time
import os
def parse_cookie():
print 'Content-Type: text/html\n'
print os.environ.get('HTTP_COO