]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/http_getter/http_getter.pl.in
Bug fixed.
[helm.git] / helm / http_getter / http_getter.pl.in
index 48371bd272c3108986b0fc7cb827b1521a4d5a97..4fcc30ba324b102aafe6fd9f9496003bbf68ea16 100755 (executable)
@@ -112,9 +112,11 @@ print "style_dir: $style_dir\n";
 print "dtd_dir: $dtd_dir\n";
 print "urls_of_uris db: $uris_dbm\n";
 print "rdf db: $rdf_dbm\n";
+print "xslt db: $xslt_dbm\n";
 print "cache mode: $cachemode\n";
 print "indexname: $indexname\n";
 print "rdf_indexname: $rdf_indexname\n";
+print "xslt_indexname: $xslt_indexname\n";
 print "\n";
 
 $SIG{CHLD} = "IGNORE"; # do not accumulate defunct processes
@@ -258,8 +260,9 @@ while (my $c = $d->accept) {
 
         } elsif ($http_method eq 'GET' and $http_path eq "/getxslt") {
 
+          $url = $xslt_map{$inputuri};
           print "Downloading XSLT ...\n";
-          helm_wget($tmp_dir, $inputuri);
+          helm_wget($tmp_dir, $url);
           print "XSLT downloaded!\n";
           $inputuri =~ s/.*\///;
           my $filename = $tmp_dir . "/" . $inputuri;
@@ -269,7 +272,7 @@ while (my $c = $d->accept) {
           while(<FD>) {
             s/xsl:import\s+href="/xsl:import href="$myownurl\/getxslt?uri=/g;
             s/xsl:include\s+href="/xsl:include href="$myownurl\/getxslt?uri=/g;
-            $cont =. $_;
+            $cont .= $_;
           }
           close(FD);
           answer($c, $cont, "text/xml", "");
@@ -861,7 +864,7 @@ sub update_dbs {
   close XSLT_INDEX;
 
                   # remove temp files
-  foreach my $file in ($idxfile, $rdf_idxfile, $xslt_idxfile) {
+  foreach my $file ($idxfile, $rdf_idxfile, $xslt_idxfile) {
     print "cannot unlink temporary file: $file\n" if (unlink $file) != 1;
   }