Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Cookie name and expiration

Reply
Thread Tools

Cookie name and expiration

 
 
ShoqulKutlu
Guest
Posts: n/a
 
      11-25-2009
Hi,

I'm testing the Cookie module's MarshalCookie in mod_python on my
localhost environment. Everything looks ok and cookie set, get and
update operations work well. But I'm not sure about the cookie name
could be set by Cookie module. I mean the name of cookie file saved in
the Temporary Internet Files directory of Internet Explorer. Consider
that I run the script as http://localhost:8080/myScripts/myScript
When I look at the Temporary Internet Files dir, not like other
cookies came from normal websites, the cookie file was saved as
"myScript/" and the cookie address is shown as http://localhost:8080/myScripts/
I don't know this is normal behaviour of the browser or there is an
option to set the name of cookie file.

I mentioned the expiration in the subject but maybe it's not related
to expiration. For example if I run directly http://localhost:8080/myScripts/myScript2
after a day and look for the temporary internet directory again, I see
a second cookie named "myScript2/" and the first cookie (myScript/)
still exists there. But the first cookie seems no longer valid for
this domain although I set the expire range for 30 days.

Do I miss something about cookies concept and behaviour of browsers?
Could anyone please clarify?

Thanks and regards,
Kutlu
 
Reply With Quote
 
 
 
 
ShoqulKutlu
Guest
Posts: n/a
 
      12-19-2009
I'd already found my problem, that I had to set the "path" propert of
a cookie object something like below:

myCookie.path = '/'

This is not the cookie content and not documented in the mod_python
cookie module documentation.

I hope this will help anyone else..

Regards,
Kutlu


On Nov 26, 1:32*am, ShoqulKutlu <(E-Mail Removed)> wrote:
> Hi,
>
> I'm testing the Cookie module's MarshalCookie in mod_python on my
> localhost environment. Everything looks ok and cookie set, get and
> update operations work well. But I'm not sure about the cookie name
> could be set by Cookie module. I mean the name of cookie file saved in
> the Temporary Internet Files directory of Internet Explorer. Consider
> that I run the script ashttp://localhost:8080/myScripts/myScript
> When I look at the Temporary Internet Files dir, not like other
> cookies came from normal websites, the cookie file was saved as
> "myScript/" and the cookie address is shown ashttp://localhost:8080/myScripts/
> I don't know this is normal behaviour of the browser or there is an
> option to set the name of cookie file.
>
> I mentioned the expiration in the subject but maybe it's not related
> to expiration. For example if I run directlyhttp://localhost:8080/myScripts/myScript2
> after a day and look for the temporary internet directory again, I see
> a second cookie named "myScript2/" and the first cookie (myScript/)
> still exists there. But the first cookie seems no longer valid for
> this domain although I set the expire range for 30 days.
>
> Do I miss something about cookies concept and behaviour of browsers?
> Could anyone please clarify?
>
> Thanks and regards,Kutlu


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting cookie expiration dates and paths yawnmoth Javascript 1 07-19-2007 02:09 AM
What relationship between cookie and ticket expiration? =?Utf-8?B?QmlsbCBCb3Jn?= ASP .Net 2 12-23-2004 07:27 AM
Trying to understand ticket/cookie expiration =?Utf-8?B?QmlsbCBCb3Jn?= ASP .Net 0 10-08-2004 10:43 PM
COOKIE EXPIRATION TIME =?Utf-8?B?T2xlZyBMZWlraW4=?= ASP .Net 15 08-04-2004 02:17 PM
Cookie Expiration Brian ASP .Net 0 07-28-2003 07:55 PM



Advertisments