X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhttp_getter%2Fhttp_getter.pl.in;h=1c7359b6c885c6c0c79665b63b5fe5cff4e0185c;hb=a67544c0aa4c12b6b900345d16d43d0ee20eccf1;hp=b1ec80aeb972c3a0dc7941f8da67a2b0574deb68;hpb=38034d883494780a817bb2d8cc30ac9b7d00b974;p=helm.git diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index b1ec80aeb..1c7359b6c 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -62,9 +62,12 @@ use Compress::Zlib; #CSC: altra roba da sistemare segnata con CSC my $d = new HTTP::Daemon LocalPort => 8081; +my $myownurl = $d->url; +$myownurl =~ s/\/$//; # chop the final slash tie(%map, 'DB_File', $uris_dbm.".db", O_RDONLY, 0664); -print "Please contact me at: url, ">\n"; +print "Please contact me at: \n"; print "helm_dir: $helm_dir\n"; +print "styles_dir: $styles_dir\n"; print "dtd_dir: $dtd_dir\n"; print "urls_of_uris.db: $uris_dbm.db\n"; print "cache mode: $cachemode\n"; @@ -234,7 +237,13 @@ EOT print "Using local copy\n"; open(FD, $filename) or die "Cannot open $filename\n"; $cont = ""; - while() { $cont .= $_; } + while() { + # Vary bad heuristic for substituion of absolute URLs + # for relative ones + 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 .= $_; + } close(FD); answer($c,$cont); } else {