Cookie aint retrieving when visiting happens from a backlink.

Nick the Gr33k nikos.gr33k at gmail.com
Fri Oct 25 11:29:35 EDT 2013


Στις 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.



More information about the Python-list mailing list