The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help with perl module installation sabyasm UNIX for Advanced & Expert Users 2 01-04-2007 09:13 AM
perl module installation problems... experts advice needed,... sekar sundaram Shell Programming and Scripting 4 12-11-2005 08:24 PM
Replace Perl Module name in all Perl scripts rahulrathod Shell Programming and Scripting 2 12-02-2005 01:00 AM
perl module DBD-Oracle hassan1 UNIX for Advanced & Expert Users 1 07-11-2005 08:22 PM
Writing perl module jo_aze Shell Programming and Scripting 4 08-06-2003 11:10 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2006
dayanandra dayanandra is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 15
Red face Help needed in Perl LWP module

Hi,

I've a issue in writing a perl script that will automatically monitor the site availability.
There are two different cookies are set in two consecutive flows to a URL and this second cookie has to be passed to the third step which actually gives permission to access based upon the cookie.

cookies set in the Ist flow by the site:
Set-Cookie: SaneID=xyz-xyz; path=/; expires=Wed, 04-Oct-11 13:31:58 GMT; domain=.xxx.com
Set-Cookie: sessionid=0001DCQZ0CCCDWPCT0T43FPXH2Y;Path=/; Secure


cookies sent in the Ist flow by the script:

Cookie: SaneID=xyz-xyz; path=/; expires=Wed, 04-Oct-11 13:31:58 GMT; domain=.xxx.com
Cookie2: $Version="1"



cookies set in the second flow by the site:

Set-Cookie: CRED=xFD0kq+lt8Q/SUFQbUwqvhDynTpSW2/t4F6JHEoeyUZ23Cll+fEAJfGE9Bq4rrLDvbsquY4Ox/5GFiVrOOp3ZzEAVRfy9UZSFaH1x8yipP0=;path=/; domain=.xxx.com; secure

Cookies sent in second flow by the script:

Cookie: SaneID=xyz-xyz; path=/; expires=Wed, 04-Oct-11 13:31:58 GMT; domain=.xxx.com
Cookie2: $Version="1"


My question is why is the latest cookie namely CRED not sent in the second flow?

The code related my cookie is
$cookie_jar = HTTP::Cookies->new();

$cookie_jar->add_cookie_header($request);
$response = $useragent->request($request);
$cookie_jar->extract_cookies($response);

Can anyone please help me?

Thanks.
  #2 (permalink)  
Old 10-05-2006
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
Quote:
Originally Posted by dayanandra

cookies set in the second flow by the site:

Set-Cookie: CRED=xFD0kq+lt8Q/SUFQbUwqvhDynTpSW2/t4F6JHEoeyUZ23Cll+fEAJfGE9Bq4rrLDvbsquY4Ox/5GFiVrOOp3ZzEAVRfy9UZSFaH1x8yipP0=;path=/; domain=.xxx.com; secure
But there is no expiration date for the cookie. So it's a session cookie. Session cookies are not normally saved to any cookie jars, because they are by definition valid for the current "session" only, and no persistence is needed. This really depends on how you write your script.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 01:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0