Re: Cookie gets changed when hit comes from a referrer

2013-10-10 Thread Ben Finney
rusi rustompm...@gmail.com writes: On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: If *anyone else* asked for help on these sorts of network and browser questions, we'd give them more constructive pointers than just google it. Someone who has so consistently

Re: Cookie gets changed when hit comes from a referrer

2013-10-10 Thread Steven D'Aprano
On Wed, 09 Oct 2013 22:36:54 -0700, rusi wrote: On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: I have no objection to encouraging people to read the fine manual, and I don't intend to be Nikos' (or anyone else's) unpaid full-time help desk and troubleshooter. But

Re: Cookie gets changed when hit comes from a referrer

2013-10-10 Thread Steven D'Aprano
On Thu, 10 Oct 2013 17:01:25 +1100, Ben Finney wrote: There are limits to how much disruption and obstinacy this community should tolerate from a given individual. I think we are in violent agreement :-) It's possible we disagree about where to draw the line, and whether persistent

Learning about HTTP [was: Cookie gets changed when hit comes from a referrer]

2013-10-10 Thread Tim Golden
On 10/10/2013 00:48, Steven D'Aprano wrote: So, for the benefit of anyone, not just Nikos, who wants to learn about how browsers connect to web sites and how to run a web server, does anyone have any recommendation for tutorials, mailing lists, web forums or books which are suitable?

Re: Cookie gets changed when hit comes from a referrer

2013-10-10 Thread Antoon Pardon
Op 10-10-13 03:10, Steven D'Aprano schreef: On Thu, 10 Oct 2013 00:31:06 +, Denis McMahon wrote: If Nikos can't even figure out the right queries to feed into a search engine to get started on such matters as looking at the cookie jar in a browser or enabling cookie logging on a server,

Re: Cookie gets changed when hit comes from a referrer

2013-10-10 Thread Denis McMahon
On Thu, 10 Oct 2013 01:10:19 +, Steven D'Aprano wrote: If Nikos wants to write programs that communicate using internet protocols, Nikos really needs to learn where internet protocols are defined, how to read and interpret those protocol definitions, and how to check that the data he's

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 7:53 πμ, ο/η Ian Kelly έγραψε: On Tue, Oct 8, 2013 at 8:18 AM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: Also i have set: ookie['ID']['expires'] = 60*60*24*365 #this cookie will expire in a year The Expires attribute takes a date. If you're passing an interval

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 08/10/2013 23:52, Νίκος Αλεξόπουλος wrote: Is there something i can try to isolate the problem and make it work? As you are the problem why not try solitary confinement? :) -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence --

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Ben Finney
Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: When a user hits my link on another website, for exmaple they are on ypsilandio.gr and they hit the link of superhost.gr then a new entry with a new cookie is appearing into my visitors table! Where is the old cookie that was saved in my

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 4:33 πμ, ο/η Steven D'Aprano έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Is there something i can try to isolate the problem and make it work? Of course there is. That is part of the job of the developer: hard work trying dozens, maybe hundreds of

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 09:24, Νίκος Αλεξόπουλος wrote: You have been told repeatedly that your questions have nothing to do with Python, e.g. Ben Finney just over an hour ago None of this has to do with Python. Please do not ask this Python doscussion forum to educate you on how HTTP operates.

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: Have you checked the cookie jar in the browser to see what value the cookie has? Is that the value you think it should have? Note that checking the cookie jar is a browser topic,

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 11:24:35 +0300, Νίκος Αλεξόπουλος wrote: Please someone esle try to reproduce the problem by just using cgi and not mod_wsgi. I have no intention of reconfiguring my web server just to prove that your code isn't working. We already know that your code isn't working. --

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: Have you checked the cookie jar in the browser to see what value the cookie has? Is that the value you think it should have? Note

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Joel Goldstick
On Wed, Oct 9, 2013 at 11:00 AM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: Have you checked the cookie jar in the browser

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 16:00, Νίκος Αλεξόπουλος wrote: ok so then tell me where i should ask this. Google, bing, duckduckgo, ask, yahoo ... -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote: Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: Have you checked the cookie jar in the browser to see what value the

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote: Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: Have you checked the cookie jar in the browser to see what value the

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 19:06, Denis McMahon wrote: Find the relevant forums and ask in them. Why am I thinking of this http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket ? -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence --

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Piet van Oostrum
Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: # initialize cookie and retrieve cookie from clients browser cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) if cookie.get('ID') is not None: cookieID = cookie['ID'].value else: cookieID = random.randrange(0, )

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Tim Chase
On 2013-10-09 19:28, Mark Lawrence wrote: On 09/10/2013 19:06, Denis McMahon wrote: Find the relevant forums and ask in them. Why am I thinking of this http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket ? There's a bug in my program, dear newsgroup, dear newsgroup, There's a bug in

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 20:26, Tim Chase wrote: On 2013-10-09 19:28, Mark Lawrence wrote: On 09/10/2013 19:06, Denis McMahon wrote: Find the relevant forums and ask in them. Why am I thinking of this http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket ? There's a bug in my program, dear

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 9:36 μμ, ο/η Piet van Oostrum έγραψε: Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: # initialize cookie and retrieve cookie from clients browser cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) if cookie.get('ID') is not None: cookieID = cookie['ID'].value

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Joel Goldstick
Expire is not the issue here, as i have it is working with no problem. when i print the cookie expiration time is calculated properly. Something else is going worng. Indeed! -- https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com --

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 23:03, Joel Goldstick wrote: Expire is not the issue here, as i have it is working with no problem. when i print the cookie expiration time is calculated properly. Something else is going worng. Indeed! Well explained here http://en.wikipedia.org/wiki/User_error -- Roses

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Steven D'Aprano
On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: Find the relevant forums and ask in them. In fairness to Nikos, that may not be an easy thing to do. I for one have *no idea* where to find an appropriate forum to learn about these sorts of web basics. comp.protocol.http doesn't exist

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 10:48 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: So, for the benefit of anyone, not just Nikos, who wants to learn about how browsers connect to web sites and how to run a web server, does anyone have any recommendation for tutorials, mailing lists,

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: Find the relevant forums and ask in them. In fairness to Nikos, that may not be an easy thing to do. I for one have *no idea* where to find an appropriate forum to learn

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: So, for the benefit of anyone, not just Nikos, who wants to learn about how browsers connect to web sites and how to run a web server, does anyone have any recommendation for tutorials, mailing lists, web forums or books which are

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Roy Smith
In article 5255eb3c$0$29984$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: So, for the benefit of anyone, not just Nikos, who wants to learn about how browsers connect to web sites and how to run a web server, does anyone have any

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Steven D'Aprano
On Thu, 10 Oct 2013 00:31:06 +, Denis McMahon wrote: On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: Find the relevant forums and ask in them. In fairness to Nikos, that may not be an easy thing to do. I for one

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 12:10 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 10 Oct 2013 00:31:06 +, Denis McMahon wrote: On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: Find the relevant forums

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 10/10/2013 02:28, Chris Angelico wrote: Half an hour spent reading there will pay good dividends. That's been sadly lacking in all of these threads. With responses coming back faster than a ball on the centre court at Wimbledon, it's hardly surprising that progress has been conspicious

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread rusi
On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: I have no objection to encouraging people to read the fine manual, and I don't intend to be Nikos' (or anyone else's) unpaid full-time help desk and troubleshooter. But I do think it is simply unfair to treat him more

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 10/10/2013 06:36, rusi wrote: On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: I have no objection to encouraging people to read the fine manual, and I don't intend to be Nikos' (or anyone else's) unpaid full-time help desk and troubleshooter. But I do think it is

Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Νίκος Αλεξόπουλος
# initialize cookie and retrieve cookie from clients browser cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') ) if cookie.get('ID') is not None: cookieID = cookie['ID'].value else: cookieID = random.randrange(0, ) cookie['ID'] = cookieID

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Ian Kelly
On Tue, Oct 8, 2013 at 4:04 AM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: I use this code to retrive or set a cookie to the visitor's browser if present and identify him bu it. All work well except the situation where the user visits my webpage by clicking a backlink on another wbpage.

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Νίκος Αλεξόπουλος
Στις 8/10/2013 2:08 μμ, ο/η Ian Kelly έγραψε: On Tue, Oct 8, 2013 at 4:04 AM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: I use this code to retrive or set a cookie to the visitor's browser if present and identify him bu it. All work well except the situation where the user visits my

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Νίκος Αλεξόπουλος
Στις 8/10/2013 2:08 μμ, ο/η Ian Kelly έγραψε: This question is really about HTTP, not Python, so you'd have better luck asking elsewhere. The most likely possibility is that the domain doesn't match. For example, the cookie is set for the domain www.foo.com, and the other webpage is linking to

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Denis McMahon
On Tue, 08 Oct 2013 13:04:34 +0300, Νίκος Αλεξόπουλος wrote: I use this code to retrive or set a cookie to the visitor's browser if present and identify him bu it. You are aware that using cookies to track a user who doesn't want to be tracked won't work, because he'll just tell his browser

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Νίκος Αλεξόπουλος
Στις 8/10/2013 6:55 μμ, ο/η Denis McMahon έγραψε: On Tue, 08 Oct 2013 13:04:34 +0300, Νίκος Αλεξόπουλος wrote: I use this code to retrive or set a cookie to the visitor's browser if present and identify him bu it. You are aware that using cookies to track a user who doesn't want to be

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Νίκος Αλεξόπουλος
Is there any better way to identif a previous visitor? i tried cookies which failed for me for the reason i opened this thread and host like follows: # try to locate the visitor cur.execute('''SELECT * FROM visitors WHERE counterID = %s and host = %s''', (cID, host) )

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Joel Goldstick
On Tue, Oct 8, 2013 at 1:30 PM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: Is there any better way to identif a previous visitor? i tried cookies which failed for me for the reason i opened this thread and host like follows: # try to locate the visitor

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Joel Goldstick
On Tue, Oct 8, 2013 at 12:04 PM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: Στις 8/10/2013 6:55 μμ, ο/η Denis McMahon έγραψε: On Tue, 08 Oct 2013 13:04:34 +0300, Νίκος Αλεξόπουλος wrote: I use this code to retrive or set a cookie to the visitor's browser if present and identify him bu

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Denis McMahon
On Tue, 08 Oct 2013 19:04:37 +0300, Νίκος Αλεξόπουλος wrote: Can you help me with this particuler problem please? Unfortunately I can't, because I am unable to reproduce the problem you describe. When I load my test page in the browser, then replace it with something else by entering an

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Νίκος Αλεξόπουλος
Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: On Tue, 08 Oct 2013 19:04:37 +0300, Νίκος Αλεξόπουλος wrote: Can you help me with this particuler problem please? Unfortunately I can't, because I am unable to reproduce the problem you describe. When I load my test page in the browser,

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Ned Batchelder
On 10/8/13 6:52 PM, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: On Tue, 08 Oct 2013 19:04:37 +0300, Νίκος Αλεξόπουλος wrote: Can you help me with this particuler problem please? Unfortunately I can't, because I am unable to reproduce the problem you describe.

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Steven D'Aprano
On Tue, 08 Oct 2013 13:47:14 -0400, Joel Goldstick wrote: Yes! there is a very simple and comprehensive way to learn about your visitors. Use Google Analytics. Its free, you only need a google account to open an analytics account.

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Steven D'Aprano
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Is there something i can try to isolate the problem and make it work? Of course there is. That is part of the job of the developer: hard work trying dozens, maybe hundreds of different things until you isolate the problem. There

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Ian Kelly
On Tue, Oct 8, 2013 at 8:18 AM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote: Also i have set: ookie['ID']['expires'] = 60*60*24*365 #this cookie will expire in a year The Expires attribute takes a date. If you're passing an interval in seconds then you should use the Max-Age