Coder Social home page Coder Social logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
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 [email protected] on 6 Feb 2014 at 12:46

from warrick.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
Thank you!!

Original comment by [email protected] on 6 Feb 2014 at 10:47

from warrick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.