cnytus has asked for the wisdom of the Perl Monks concerning the following question:
LWP::UserAgent::new: () LWP::UserAgent::new: () LWP::UserAgent::request: () LWP::UserAgent::send_request: PROPFIND https://fddld.com/sites/A055/files/ LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::collect: read 791 bytes LWP::Protocol::collect: read 865 bytes LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: Keep alive not enabled, emitting a warning The keep_alive option must be enabled for NTLM authentication to work. NTLM authentication aborted.
#!/usr/bin/perl -w use strict; use warnings; use Getopt::Long; use HTTP::DAV; my $debug = '1'; if ($debug) { LWP::Debug::level('+'); SOAP::Lite->import(+trace => 'all'); } my @ua_args = (keep_alive => 1); #my ( $source, $destination, $username, $password ); my $source = "/home/jadli_r/sharepoint_test/test.txt"; my $destination = "https://fddld.com/sites/A055/files/"; my $username = "uname"; my $password = "passwd"; my $dav = new HTTP::DAV; $dav->credentials( -user =>$username, -pass =>$password, -url =>$destination, ); my $ua = LWP::UserAgent->new( keep_alive => 1 ); $dav->open( -url=>$destination ) or die("Couldnt open $destination: " .$dav->message . "\n"); #if ( $dav->put( -local => "$source", -url => $destination ) ) { # print "\nSuccessfully uploaded $source to $destination\n"; #} #else { # print "Put failed: " . $dav->message . "\n"; #} $dav->put( -local => "$source", -url => $destination )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: http::dav keep_alive not enabled
by Khen1950fx (Canon) on Jan 06, 2011 at 05:37 UTC | |
by cnytus (Initiate) on Jan 06, 2011 at 10:18 UTC | |
by Corion (Patriarch) on Jan 06, 2011 at 10:28 UTC | |
|
Re: http::dav keep_alive not enabled
by Khen1950fx (Canon) on Jan 06, 2011 at 13:44 UTC | |
by cnytus (Initiate) on Jan 06, 2011 at 14:02 UTC |