mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Debug code.
This commit is contained in:
37
class2.php
37
class2.php
@@ -2612,6 +2612,13 @@ class e_http_header
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function unsetHeader($header)
|
||||||
|
{
|
||||||
|
header_remove($header);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function send()
|
function send()
|
||||||
{
|
{
|
||||||
@@ -2626,6 +2633,34 @@ class e_http_header
|
|||||||
*/
|
*/
|
||||||
// $this->setHeader("Cache-Control: public", true);
|
// $this->setHeader("Cache-Control: public", true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if(defined('e_HTTP_STATIC'))
|
||||||
|
{
|
||||||
|
unset($_COOKIE);
|
||||||
|
|
||||||
|
$siteurl = str_replace('https','http',SITEURL);
|
||||||
|
$static = str_replace('https','http', e_HTTP_STATIC);
|
||||||
|
|
||||||
|
if($siteurl === $static && deftrue('e_SUBDOMAIN'))
|
||||||
|
{
|
||||||
|
$accessControl = str_replace(e_SUBDOMAIN.'.', '', SITEURLBASE);
|
||||||
|
|
||||||
|
$this->unsetHeader("Cache-Control");
|
||||||
|
// $this->unsetHeader("Content-Type");
|
||||||
|
$this->unsetHeader("Set-Cookie");
|
||||||
|
$this->unsetHeader("Pragma");
|
||||||
|
$this->unsetHeader("Expires");
|
||||||
|
|
||||||
|
$this->setHeader("Access-Control-Allow-Origin: ".$accessControl, true);
|
||||||
|
$this->setHeader("Cache-Control: public", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->setHeader("Access-Control-Allow-Origin: ".$static, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
$canCache = e107::canCache();
|
$canCache = e107::canCache();
|
||||||
|
|
||||||
@@ -2679,6 +2714,8 @@ class e_http_header
|
|||||||
$this->setHeader('Vary: Accept');
|
$this->setHeader('Vary: Accept');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// should come after the Etag header
|
// should come after the Etag header
|
||||||
if ($canCache && isset($_SERVER['HTTP_IF_NONE_MATCH']))
|
if ($canCache && isset($_SERVER['HTTP_IF_NONE_MATCH']))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user