Στις 25/10/2013 6:17 μμ, ο/η Denis McMahon έγραψε:
If the client is not sending the expected cookie to the server, then the
most likely problem is that the client does not associate that particular
cookie with the server url. If this is the case, then the problem is that
when you initially sent the cookie to the client, you did not define the
server url in the cookie in a manner that would cause the client to
associate the cookie with the url in the subsequent request. This is not
a python problem, it's an http cookies problem, and the answer lies in
the cookie you are creating.

Assiciate the cookie with the url?
You mean add a domain directive to the cookie like:

# initialize cookie and retrieve cookie from clients browser
try:
        cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] )
        cookieID = cookie['name'].value
except:
        cookieID = random.randrange(0, 9999)
        cookie['ID'] = cookieID
        cookie['ID']['domain'] = "superhost.gr"
        cookie['ID']['path'] = '/'
        print( cookie )

If this is how you mean it does not solve anything, problem persits.
I googled lots of hours and days about this but this is not mentioned in any thread and i', stuck.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to