Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57498

Cookie aint retrieving when visiting happens from a backlink.

From Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com>
Newsgroups comp.lang.python
Subject Cookie aint retrieving when visiting happens from a backlink.
Date 2013-10-25 10:22 +0300
Organization A noiseless patient Spider
Message-ID <l4d66o$4bd$1@dont-email.me> (permalink)

Show all headers | View raw


Hello i having the following code to try and retrieve the visitor's 
saved cookie form the browser.

[CODE]
# initialize cookie and retrieve cookie from clients browser
try:
	cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] )
	cookieID = cookie['name'].value
except:
	cookieID = 'visitor'
[/CODE]

It works as expected except form the fact from when the visitor enters 
my webpage(superhost.gr) by clicking a backlink of another webpage.

Then even if the cookie exists in his browser for some reason the try 
fails and except take actions.

Can somebody explain why this is happening?

You can see this action yourself by hitting:

1. superhost.gr as a direct hit
2. by clicking superhost.gr's backlink from ypsilandio.gr/mythosweb.gr

You will see than in 2nd occasion another ebtry will appear in the 
database here:

http://superhost.gr/?show=log&page=index.html

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Cookie aint retrieving when visiting happens from a backlink. Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-25 10:22 +0300
  Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-25 18:32 +1100
    Re: Cookie aint retrieving when visiting happens from a backlink. Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-25 11:25 +0300
      Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-25 19:33 +1100
        Re: Cookie aint retrieving when visiting happens from a backlink. Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-25 11:46 +0300
          Re: Cookie aint retrieving when visiting happens from a backlink. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 10:03 +0100
          Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 13:30 +0300
            Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-25 21:51 +1100
              Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 14:46 +0300
                Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-25 23:11 +1100
                Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 15:20 +0300
                Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-25 23:35 +1100
                Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 15:54 +0300
                Re: Cookie aint retrieving when visiting happens from a backlink. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 15:21 +0100
                Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 18:04 +0300
                Re: Cookie aint retrieving when visiting happens from a backlink. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 16:12 +0100
                Re: Cookie aint retrieving when visiting happens from a backlink. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-10-26 16:05 +0200
                Re: Cookie aint retrieving when visiting happens from a backlink. Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-25 15:17 +0000
                Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 18:29 +0300
                Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-26 02:34 +1100
                Re: Cookie aint retrieving when visiting happens from a backlink. Joel Goldstick <joel.goldstick@gmail.com> - 2013-10-25 11:36 -0400
                Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-25 18:49 +0300
                Re: Cookie aint retrieving when visiting happens from a backlink. Steve Simmons <square.steve@gmail.com> - 2013-10-25 17:28 +0100
                Re: Cookie aint retrieving when visiting happens from a backlink. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 19:17 +0100
                Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-26 11:19 +1100
      Re: Cookie aint retrieving when visiting happens from a backlink. Piet van Oostrum <piet@vanoostrum.org> - 2013-10-26 21:17 -0400
        Re: Cookie aint retrieving when visiting happens from a backlink. Roy Smith <roy@panix.com> - 2013-10-26 21:34 -0400
        Re: Cookie aint retrieving when visiting happens from a backlink. Piet van Oostrum <piet@vanoostrum.org> - 2013-10-26 22:24 -0400
          Re: Cookie aint retrieving when visiting happens from a backlink. Nick the Gr33k <nikos.gr33k@gmail.com> - 2013-10-27 08:45 +0200
    Re: Cookie aint retrieving when visiting happens from a backlink. Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-10-25 11:26 +0300
  Re: Cookie aint retrieving when visiting happens from a backlink. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-25 15:13 +0000
    Re: Cookie aint retrieving when visiting happens from a backlink. Chris Angelico <rosuav@gmail.com> - 2013-10-26 02:28 +1100

csiph-web