HTTPS and LWP

Aidan Van Dyk (aidan@ottawa.com)
Thu, 30 Sep 1999 17:01:05 -0400 (EDT)


Hi.  I've recently began using LWP and Perl.  One problem I've come
across in the HTTPS protocol.

when using LWP::Protocol::https, memory usage always seems to grow. 
I'm not familiar enough with the inards of LWP yet to be able to
determine easily if it's a problem in LWP or the underlying SSL sockets
being used.

If using the standard http protocol, it does not continue to grow.  The
following script is an example - use http: and it happliy runs and
doesn't grow, use an https, and it keeps  growing consitantly...

Any ideas?  Am I doing something wrong which could solve the problem?

a.


#! /usr/bin/perl -w

use LWP::UserAgent;

$ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);

while (1)
{
    # Create a request
    my $req = new HTTP::Request GET => 'http://host.domain.com/';

    # Pass request to the user agent and get a response back
    my $res = $ua->request($req);

    if ($res->is_success) {
        print $res->content;
    } else {
        print "Bad luck this time\n";
    }

}

-- 
Aidan Van Dyk                                        Create like a god,
aidan@ottawa.com                                   command like a king,
http://www.highrise.ca/                              work like a slave.

   |\^/|       |\^/|       |\^/|       |\^/|       |\^/|       |\^/|
_|\|   |/|_ _|\|   |/|_ _|\|   |/|_ _|\|   |/|_ _|\|   |/|_ _|\|   |/|_
>    C    < >    a    < >    n    < >    a    < >    d    < >    a    <
 >_./|\._<   >_./|\._<   >_./|\._<   >_./|\._<   >_./|\._<   >_./|\._<