In the HTTP headers I receive: Set-Cookie: digishipcookie1=deleted; expires=Sun, 20-Jan-02 22:06:48 GMT; path=/ Set-Cookie: digishipcookie2=deleted; expires=Sun, 20-Jan-02 22:06:48 GMT; path=/ Set-Cookie: digishipcookie1=1601729586VVAQKEEGMO; path=/ Set-Cookie: digishipcookie2=16179; path=/
I know the first two are where we kill the cookie upon login in case it was there already. By using the HTTP::Cookies::Netscape->as_string() method after an HTTP response, I get the following: Set-Cookie3: digishipcookie1=1601729586VVAQKEEGMO; path="/"; domain="maul.local"; path_spec; discard; version=0 Set-Cookie3: digishipcookie2=16179; path="/"; domain="maul.local"; path_spec; discard; version=0 Is the path_spec part what tells the client that is essentially a session cookie? I thought there would have been an expires in there that uses now as the time. The HTTP::Cookie docs say that the Set-Cookie3: format is an LWP proprietary format, why then when I use HTTP::Cookies::Netscape do I still get that in the as_string output? Because it's inherited? I'm going to be using Perl for this entire client script set, so which HTTP::Cookies module am I "better off" using? HTTP:Cookies or one of the sub-classed derivatives? Thanks. > -----Original Message----- > From: Doug Monroe [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 20, 2003 3:57 PM > To: Darren Young > Cc: [EMAIL PROTECTED] > Subject: Re: Session Cookies > > > Darren Young wrote: > > > > I have a scipt that connects up to out site and does a > login. Part of > > our login process is to set a few cookies on the client for > pages to > > use. The cookies are only good for the session, however for > this test > > script I want to save the information for posting to other > pages. I'm > > looking for some recommendations on how to do this. I thought maybe > > parsing the headers and looking for the Set-Cookie lines or perhaps > > using the HTTP::Cookies module somehow. Any pointers would be most > > helpful. > > see perldoc HTTP::Cookies > > BTW, "Set-Cookie:" header is used by server-side to "set" the > client-side cookie, "Cookie:" header contains any that were > sent from the client. >
