Forum Discussion

trx's avatar
Feb 09, 2011

logging each cookie name failing in logs

Hello all,

The below code is throwing an error in the logs:

 

 

 

when HTTP_REQUEST {

 

set cookies [HTTP::cookie names]

 

foreach cookie $::cookies {

 

log local0. "Cookie: $::cookie"

 

}

 

 

}

 

 

 

Error in logs:

 

 

 

TCL error: qadpreviewdev.qad.com HTTP_RESPONSE - cant read ::cookies: no such variable while executing foreach cookie $::cookies { log local0. Cookie: $::cookie }

 

 

 

Any help if fully appreciated.

 

 

 

Thanks.

 

 

 

Regards,

 

TRX

 

  • The second question is still kind of confusing.

     

    If the cookie already exist on the client machine and if you want to expire that cookie, the cookie insert function will create a new cookie with the same name, etc and will be expired. But that leaves you with 2 cookies with the same name correct? One is not expired and the other expired. It should not allow 2 cookies with the same name, so what happens to the original cookie?

     

     

     

     

    Any thoughts?

     

     

     

    Thanks.

     

     

     

    Regards,

     

    TRX