Open GoogleCodeExporter opened 8 years ago
This is caused is a simple escaping bug in mcurl.pl and MementoThread.pm that
can be fixed with a patch as follows:
~/t2/warrick2$ diff -u ../../warrick2/mcurl.pl mcurl.pl
--- ../../warrick2/mcurl.pl 2014-02-05 16:35:37.362518862 -0800
+++ mcurl.pl 2012-03-27 13:02:41.000000000 -0700
@@ -95,10 +95,7 @@
for (my $i = 0; $i <= $#ARGV; ++$i) #
{
- if ( ( index($ARGV[$i] , ' ') > -1 )
- or ( index($ARGV[$i] , '?') > -1 )
- or ( index($ARGV[$i] , '*') > -1 )
- ) {
+ if ( index($ARGV[$i] , ' ') > -1 ){
$ARGV[$i] = '"' .$ARGV[$i] . '"';
}
}
~/t2/warrick2$ diff -u ../../warrick2/MementoThread.pm MementoThread.pm
--- ../../warrick2/MementoThread.pm 2014-02-05 16:38:19.914518843 -0800
+++ MementoThread.pm 2012-03-27 13:02:42.000000000 -0700
@@ -97,7 +97,7 @@
$acceptDateTimeHeader = " -H \"Accept-Datetime: ".$self->{DateTime}." \" ";
}
- my $command = "curl -I $acceptDateTimeHeader \"$self->{URI}\" ";
+ my $command = "curl -I $acceptDateTimeHeader $self->{URI} ";
if($self->{Debug} == 1){
print "DEBUG: " .$command ."\n";
}
@@ -351,7 +351,7 @@
} else {
- $command = "curl @params $acceptDateTimeHeader \"". $self->{TimeGate}
."/" . $self->{URI} . "\"";
+ $command = "curl @params $acceptDateTimeHeader ". $self->{TimeGate}
."/" . $self->{URI};
}
@@ -390,7 +390,7 @@
$command = "curl -I -L $acceptDateTimeHeader ". $self->{Info}->{TimeGate} ;
} else {
- $command = "curl -I -L $acceptDateTimeHeader \"".
$self->{TimeGate} ."/" . $self->{URI} . "\"";
+ $command = "curl -I -L $acceptDateTimeHeader ".
$self->{TimeGate} ."/" . $self->{URI};
}
@@ -667,4 +667,4 @@
return $result;
}
Original comment by b4r...@gmail.com
on 6 Feb 2014 at 12:46
Thank you!!
Original comment by szepe.vi...@gmail.com
on 6 Feb 2014 at 10:47
Original issue reported on code.google.com by
szepe.vi...@gmail.com
on 31 Aug 2013 at 4:42