#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:", $d->url, ">\n";
+print "Please contact me at: <URL:", $myownurl."/", ">\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";
print "Using local copy\n";
open(FD, $filename) or die "Cannot open $filename\n";
$cont = "";
- while(<FD>) { $cont .= $_; }
+ while(<FD>) {
+ # 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 {