return $self->redirect_auth unless $self->editor->requestor;
# Don't cache anything requiring auth for security reasons
- $self->apache->headers_out->add("cache-control" => "no-store, no-cache, must-revalidate");
- $self->apache->headers_out->add("expires" => "-1");
+ $self->apache->headers_out->add("cache-control" => "no-cache, must-revalidate");
return $self->load_email_record if $path =~ m|opac/record/email|;
$vhost_processor_cache{$processor_key} = $tt;
$ctx->{encode_utf8} = sub {return encode_utf8(shift())};
- unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => $text_handler}, $r)) {
+ my $_out = '';
+ unless($tt->process($template, {ctx => $ctx, ENV => \%ENV, l => $text_handler}, \$_out)) {
$r->log->warn('egweb: template error: ' . $tt->error);
return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
}
+ my $etag = md5_hex(Encode::encode_utf8($_out);)
+ $r->headers_out->add('Etag' => "\"$etag\"");
+ $r->print($_out);
+
return Apache2::Const::OK;
}