Ok so.... FYI, I upgraded to ActiveState build 806 of perl 5.8.0 and still the same problem. I'm guessing that it's something in the actual cookie header that is thwarting HTTP::Cookies's attempts to process the cookie. I've successfully traversed the maze all the way to Wit's End. here is the test case code and the exact output ( first on Windows Perl 5.8.0 build 806, then on RedHat Linux Perl 5.6.1 then again on Windows perl 5.6.1 build 631.
#!/usr/bin/perl -w use strict; use LWP; use HTTP::Cookies; use Data::Dumper; my $oper = shift; my $user = 'user'; my $pword = 'pasword'; my $cj = HTTP::Cookies->new; my $ua = LWP::UserAgent->new; $ua->cookie_jar( $cj ); # A place to hold the cookies from ET +SS BO's $ua->agent("PerlWebBot/1.0 "); # Create a request my $req = HTTP::Request->new(POST => 'http://xmes.mydomain.com/pack/ +usermgr'); $req->content_type('application/x-www-form-urlencoded'); $req->content("operation=authenticateUser&userid=$user"."&password=$ +pword"); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print "Got something back...\n"; } else { print "Unable to contact server \n"; } print "LWP Version -> " , $LWP::VERSION , "\n"; print "Cookie Cutter -> " , $HTTP::Cookies::VERSION , "\n"; print $res->headers()->as_string() , "\n\n"; print Dumper($ua->cookie_jar() ) ; ----------------------------------------------------- results: D:\code>wipit.pl Got something back... LWP Version ->5.69 Cookie cutter -> 1.30 Connection: close Date: Fri, 27 Jun 2003 01:49:30 GMT Server: Apache/1.3.14 (Unix) tomcat/1.0 Content-Type: text/plain Client-Date: Fri, 27 Jun 2003 05:49:36 GMT Client-Peer: 9.61.8.22:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Set-Cookie: member=QkFERVJEICB8KioqKioqKip8MTA1NjY3ODU3MXxXRVNUfDE0MzI +2fEVTVDVFRFR8VVN8ZW58OS42Ni4xNzQuMjAzfDc 0MTAzOHw=; expires=Fri, 27-Jun-2003 02:09:31 GMT; path=/; domain=btv.i +bm.com; $VAR1 = bless( { 'COOKIES' => { '.btv.ibm.com' => { '/' => {} } } }, 'HTTP::Cookies' ); Linux:----------- Got something back... LWP Version ->5.69 Cookie cutter -> 1.30 Connection: close Date: Fri, 27 Jun 2003 01:29:41 GMT Server: Apache/1.3.14 (Unix) tomcat/1.0 Content-Type: text/plain Client-Date: Fri, 27 Jun 2003 01:29:28 GMT Client-Peer: 9.61.8.22:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Set-Cookie: member=QkFERVJEICB8KioqKioqKip8MTA1NjY3NzM4MnxXRVNUfDE0ODI +4fEVTVDVFRFR8VVN8ZW58OS42Ni4xNzUuMTk3fDc 0MTAzOHw=; expires=Fri, 27-Jun-2003 01:49:42 GMT; path=/; domain=btv.i +bm.com; $VAR1 = bless( { 'COOKIES' => { '.btv.ibm.com' => { '/' => { 'member' +=> [ + 0, + 'QkFERVJEICB8KioqKioqKip8MTA1NjY3Nz M4MnxXRVNUfDE0ODI4fEVTVDVFRFR8VVN8ZW58OS42Ni4xNzUuMTk3fDc0MTAzOHw=', + undef, + '1', + undef, + '1056678582' + ] } } } }, 'HTTP::Cookies' ); Window Perl 5.6.1 ---------------------- Got something back... LWP Version ->5.51 Cookie cutter -> 1.14 Connection: close Date: Fri, 27 Jun 2003 01:36:56 GMT Server: Apache/1.3.14 (Unix) tomcat/1.0 Content-Type: text/plain Client-Date: Fri, 27 Jun 2003 01:43:09 GMT Client-Peer: 9.61.8.22:80 Set-Cookie: member=QkFERVJEICB8KioqKioqKip8MTA1NjY3NzgxN3xXRVNUfDMyMjI +3fEVTVDVFRFR8VVN8ZW58OS42Ni4xNzUuMTR8NzQ xMDM4fA==; expires=Fri, 27-Jun-2003 01:56:57 GMT; path=/; domain=btv.ibm.com; $VAR1 = bless( { 'COOKIES' => { '.btv.ibm.com' => { '/' => { 'member' +=> [ + 0, + 'QkFERVJEICB8KioqKioqKip8MTA1NjY3NzgxN3xXRVNU fDMyMjI3fEVTVDVFRFR8VVN8ZW58OS42Ni4xNzUuMTR8NzQxMDM4fA==', + undef, + '1', + undef, + '1056679017' + ] } } } }, 'HTTP::Cookies' );

In reply to Re: LWP Cookies in Perl 5.8 by dataDrone
in thread LWP Cookies in Perl 5.8 by dataDrone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.