X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhttp_getter%2Fhttp_getter.pl.in;fp=helm%2Fhttp_getter%2Fhttp_getter.pl.in;h=4fcc30ba324b102aafe6fd9f9496003bbf68ea16;hb=47ed689d3cb6aace3fffd51f3d6b9c5d247508da;hp=48371bd272c3108986b0fc7cb827b1521a4d5a97;hpb=a00c96b7a2948c5dc191960b423afb92b698389d;p=helm.git diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index 48371bd27..4fcc30ba3 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -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() { 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; }