On Fri Mar 16 19:01:29 2012, prometheanfire wrote:
Show quoted text> an example request
>
> request => HTTP::Request->new( "DELETE" => $fulluri, [ 'X-Auth-Token' =>
> $authtok ] )
>
> I think the error is that $req->protocol is not defined
>
> This paste is my code that generates the error (the x-auth-token bit
> doesn't seem to be needed
>
>
http://dpaste.com/hold/717566/
>
> If you want me to test stuff let me know
Looks like manually specifying this fixed it
$req->protocol('HTTP/1.1');
while ($running < $MAX) {
my $file = shift @objlist;
#my $fulluri = "$storageurl/$container/$file";
my $fulluri = "/v1/$tenantId/$container/$file";
print "$fulluri\n\n\n";
my $req = HTTP::Request->new( DELETE => "$fulluri", [ 'X-Auth-Token' => $authtok ] );
$req->protocol('HTTP/1.1');
#$req->header(Host => '173.203.3.30');
#$req->header(Connection => 'Keep-Alive');
$http->do_request(
request => $req,
host => "173.203.3.30",
SSL => TRUE,
on_response => sub {
if ($is_verbose) {
my ( $response ) = @_;
#$response->as_string =~ s/^/| /mg;
print ",", '-' x 78, "\n";
print $response->as_string;
print "`", '-' x 78, "\n";
}
$running--;
},
on_error => sub {
#print "error deleteing $fulluri\n";
},
);
$running++;
}