Cookie name and expiration

Discussion in 'Python' started by ShoqulKutlu, Nov 25, 2009.

  1. ShoqulKutlu

    ShoqulKutlu Guest

    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
     
    ShoqulKutlu, Nov 25, 2009
    #1
    1. Advertising

  2. ShoqulKutlu

    ShoqulKutlu Guest

    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 <> 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
     
    ShoqulKutlu, Dec 19, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian

    Cookie Expiration

    Brian, Jul 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    427
    Brian
    Jul 28, 2003
  2. =?Utf-8?B?T2xlZyBMZWlraW4=?=

    COOKIE EXPIRATION TIME

    =?Utf-8?B?T2xlZyBMZWlraW4=?=, Aug 1, 2004, in forum: ASP .Net
    Replies:
    15
    Views:
    1,142
    Scott M.
    Aug 4, 2004
  3. =?Utf-8?B?QmlsbCBCb3Jn?=

    Trying to understand ticket/cookie expiration

    =?Utf-8?B?QmlsbCBCb3Jn?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    357
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Oct 8, 2004
  4. =?Utf-8?B?QmlsbCBCb3Jn?=

    What relationship between cookie and ticket expiration?

    =?Utf-8?B?QmlsbCBCb3Jn?=, Dec 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    380
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Dec 23, 2004
  5. yawnmoth
    Replies:
    1
    Views:
    81
    yawnmoth
    Jul 19, 2007
Loading...

Share This Page