i have the following sample.. any idea as to why it's not correctly performing the keep_alive function..
======================================================================== use LWP::UserAgent; use HTTP::Request; use HTTP::Cookies; use LWP::ConnCache; use WWW::Mechanize; $ua = new LWP::UserAgent("keep_alive"=>"50"); $jar = new HTTP::Cookies; $ua->timeout(30); $ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608" . $ua->agent); $ua->cookie_jar($jar); push @{$ua->requests_redirectable}, 'POST'; #$cache = $ua->conn_cache(LWP::ConnCache->new()); $cache = $ua->conn_cache->total_capacity(50); ### test using libwww $p_url = "http://soc.our.psu.edu/soc/main_search.cfm"; $req = new HTTP::Request POST => $p_url; $req->content_type('application/x-www-form-urlencoded'); $cstr1 = "?Semester=FALL%202004&CrseLoc=&CECrseLoc=&CourseAbbrev=0&CrseAlpha=&CourseN um=0"; $req->content($cstr1); $agent = $ua->request($req); print "-------------111111111----------\n"; print "agent->code = ". $agent->code(). "\n"; print "agent->msg = ". $agent->message(). "\n"; print "agent->base = ". $agent->base. "\n"; print "agent->hdr = ". $agent->headers_as_string(). "\n"; #print "agent->cont = ". $agent->as_string. "\n"; #print "agent->req = ". $agent->request(). "\n"; $cstr2 = "?Semester=FALL%202004&CrseLoc=AA%3A%3AAltoona%20Campus" . "&CECrseLoc=&CourseAbbrev=0&CrseAlpha=&CourseNum=0"; $req->content($cstr2); $agent = $ua->request($req); print "-------------2222222222----------\n"; print "agent->code = ". $agent->code(). "\n"; print "agent->msg = ". $agent->message(). "\n"; print "agent->base = ". $agent->base. "\n"; print "agent->hdr = ". $agent->headers_as_string(). "\n"; #print "agent->cont = ". $agent->as_string. "\n"; #print "agent->req = ". $agent->request(). "\n"; $cstr3 = "?Semester=FALL%202004&CrseLoc=AA%3A%3AAltoona%20Campus" . "&CECrseLoc=&CourseAbbrev=0&CrseAlpha=a%2Dc&CourseNum=0"; $req->content($cstr3); $agent = $ua->request($req); print "-------------33333333----------\n"; print "agent->code = ". $agent->code(). "\n"; print "agent->msg = ". $agent->message(). "\n"; print "agent->base = ". $agent->base. "\n"; print "agent->hdr = ". $agent->headers_as_string(). "\n"; print "agent->cont = ". $agent->as_string. "\n"; #print "agent->req = ". $agent->request(). "\n"; die; ============================================================ not sure as to how it should be implemented... thanks for any insight... -bruce