in reply to http::dav keep_alive not enabled

To enable keep_alive on LWP:

my $ua = LWP::UserAgent->new( keep_alive => 1 );

Replies are listed 'Best First'.
Re^2: http::dav keep_alive not enabled
by cnytus (Initiate) on Jan 06, 2011 at 10:18 UTC
    Hi Khen, Thanks for your reply but unfortunately lwp::useragent is getting created as part of dav (i copied the code above) and can't overwrite it by LWP::UserAgent->new( keep_alive => 1 ); . Thanks, Cuneyt

      You can pass in a premade custom user agent (preferrably a HTTP::DAV::UserAgent, constructed with the appropriate parameters, via the -useragent => ... constructor parameter, or at least that's what the source code suggests to me.

      Update: ... and looking at the HTTP::DAV documentation, it even shows how to pass in custom headers.