Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Nick the Gr33k Newsgroups: comp.lang.python Subject: Re: Cookie aint retrieving when visiting happens from a backlink. Date: Fri, 25 Oct 2013 18:29:35 +0300 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 25 Oct 2013 15:29:36 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="a1b1c998706ea909b411b0aa8fb726b2"; logging-data="415"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hVrVI67fidRm4Lbiho2TB" User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 In-Reply-To: Cancel-Lock: sha1:bRHp4b18cwf7G8Y4qQ+FWZOy8GI= Xref: csiph.com comp.lang.python:57534 Στις 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.