Set cache control to "none" if the DataForm uses a captcha. Fixes bug #11381.
This commit is contained in:
parent
bdccf5829b
commit
ae8c1a6124
3 changed files with 26 additions and 4 deletions
|
|
@ -308,8 +308,14 @@ sub sendHeader {
|
|||
}
|
||||
# in all other cases, set cache, but tell it to ask us every time so we don't mess with recently logged in users
|
||||
else {
|
||||
$request->headers_out->set('Last-Modified' => $date);
|
||||
$request->headers_out->set('Cache-Control' => "must-revalidate, max-age=" . $cacheControl);
|
||||
if ( $cacheControl eq "none" ) {
|
||||
$request->headers_out->set("Cache-Control" => "private, max-age=1");
|
||||
$request->no_cache(1);
|
||||
}
|
||||
else {
|
||||
$request->headers_out->set('Last-Modified' => $date);
|
||||
$request->headers_out->set('Cache-Control' => "must-revalidate, max-age=" . $cacheControl);
|
||||
}
|
||||
# do an extra incantation if the HTTP protocol is really old
|
||||
if ($request->protocol =~ /(\d\.\d)/ && $1 < 1.1) {
|
||||
my $date = $datetime->epochToHttp(time() + $cacheControl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue