Cookie name and expiration

S

ShoqulKutlu

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
 
S

ShoqulKutlu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,048
Members
48,769
Latest member
Clifft

Latest Threads

Top