]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/http_getter/http_getter.pl.in
Content-Cache, Expires and Pragma added for non-error responses.
[helm.git] / helm / http_getter / http_getter.pl.in
index 924ddbb1930e966ef1c810e5f1633d597e31ca44..2aa678e9f1a3f86be00833fb4f3b56b9a667fb32 100755 (executable)
@@ -153,7 +153,11 @@ while (my $c = $d->accept) {
                my $ciccontent = download($patch_dtd,"cic",$cicurl,$cicfilename,$answerformat);
 
                # Answering the client
+              if ($answerformat eq "normal") {
+                answer($c,$ciccontent,"text/xml","");
+               } else {
                 answer($c,$ciccontent,"text/xml","x-gzip");
+               }
             }
         } elsif ($http_method eq 'GET' and $http_path eq "/resolve") {
           my $outputurl = $map{$inputuri};
@@ -603,6 +607,9 @@ sub answer {
    unless ($contype eq "");
  $res->push_header("Content-Encoding" => $contenc)
    unless ($contenc eq "");
+ $res->push_header("Cache-Control" => "no-cache");
+ $res->push_header("Pragma" => "no-cache");
+ $res->push_header("Expires" => "0");
  $c->send_response($res);
 }