answer($c,$cont,"text/xml","");
} elsif ($http_method eq 'GET' and $http_path eq "/getdtd") {
- my $filename = $inputuri;
- $filename = $dtd_dir."/".$filename;
- print "DTD: $inputuri ==> ($filename)\n";
- if (stat($filename)) {
- print "Using local copy\n";
- open(FD, $filename) or die "Cannot open $filename\n";
- $cont = "";
- while(<FD>) {
- # Vary bad heuristic for substituion of absolute URLs
- # for relative ones
- s/ENTITY (.*) SYSTEM\s+"/ENTITY $1 SYSTEM "$myownurl\/getdtd?uri=/g;
- $cont .= $_;
- }
- close(FD);
- answer($c,$cont,"text/xml","");
- } else {
- die "Could not find DTD!";
- }
+
+# my $filename = $inputuri;
+# $filename = $dtd_dir."/".$filename;
+# print "DTD: $inputuri ==> ($filename)\n";
+# if (stat($filename)) {
+# print "Using local copy\n";
+# open(FD, $filename) or die "Cannot open $filename\n";
+# $cont = "";
+# while(<FD>) {
+# # Vary bad heuristic for substituion of absolute URLs
+# # for relative ones
+# s/ENTITY (.*) SYSTEM\s+"/ENTITY $1 SYSTEM "$myownurl\/getdtd?uri=/g;
+# $cont .= $_;
+# }
+# close(FD);
+# answer($c,$cont,"text/xml","");
+# } else {
+# die "Could not find DTD!";
+# }
} elsif ($http_method eq 'GET' and $http_path eq "/getstyleconf") {
my $filename = $inputuri;
print "Help requested!\n";
html_nice_answer($c,"HTTP Getter Version: $VERSION");
+ } elsif ($http_method eq 'GET' and $http_path eq "/getempty") {
+ # return an empty, but valid, xml document
+ my $emptyxml = <<EOXML;
+<?xml version="1.0"?>
+<!DOCTYPE empty [
+ <!ELEMENT empty EMPTY>
+]>
+<empty />
+EOXML
+ answer($c, $emptyxml, "", "");
+
} elsif ($http_method eq 'GET' and $http_path =~ /\.cgi$/) {
# cgi handling
print "CGI requested!\n";