i have get and send cookies. but script sends 1 extra cookie. 
look at my requests header:
POST http://www.clickzones.com/cookiejs_test.php3
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Content-Type: application/x-www-form-urlencoded
Cookie: testCookie=clickzones
Cookie2: $Version=1

output=Is+Javascript+supported%3F%3F%3F


WHAT IS "Cookie2: $Version=1" ?  it is extra. i dont want it.
i think it is a BUG. i have found a BUG :-)

i attached my test script (smaller than first. pls look)


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
#!/usr/bin/perl -w
use strict;
$|++;

use LWP::UserAgent;
use HTTP::Headers;
use HTTP::Cookies;

my $ua = LWP::UserAgent->new;
$ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)');

my $jar = HTTP::Cookies->new;
$ua->cookie_jar($jar);


my $req = HTTP::Request->new('GET','http://www.clickzones.com/cookiejs_test.php3');
my $res = $ua->request($req);

print $res->as_string( );

$req = HTTP::Request->new('POST','http://www.clickzones.com/cookiejs_test.php3');
$req->content_type('application/x-www-form-urlencoded');
$req->content('output=Is+Javascript+supported%3F%3F%3F');
$res=$ua->request($req);

print $req->as_string( );
$jar->clear();

if (($res->is_success) and ($res->content=~/Cookie is enabled/))
{print " ****** working ******\n";
}

Reply via email to