Commit d29976ff authored by Chris Graham's avatar Chris Graham

Fixed MANTIS-4040 (Redirects should not be statically cached)

parent 896b377b
......@@ -1041,6 +1041,14 @@ function do_site()
*/
function save_static_caching($out, $mime_type = 'text/html')
{
// We cannot cache if there's a redirect
$headers_sent = headers_list();
foreach ($headers_sent as $header) {
if (preg_match('#^Location:#i', $header) != 0) {
return;
}
}
global $SITE_INFO;
if ((cms_srv('REQUEST_METHOD') != 'POST') && (isset($SITE_INFO['fast_spider_cache'])) && ($SITE_INFO['fast_spider_cache'] != '0') && (is_guest()) && (!$GLOBALS['IS_ACTUALLY_ADMIN'])) {
if ((get_zone_name() == '') && (get_zone_default_page('') == get_page_name()) && (count(array_diff(array_keys($_GET), array('page', 'keep_session', 'keep_devtest', 'keep_failover'))) > 0)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment