From 2c5fda82fbd37cd8da9cefd415c44176682dcf19 Mon Sep 17 00:00:00 2001 From: Jose Luis Duran Date: Tue, 14 Apr 2015 19:18:28 -0300 Subject: Combine Cache-Control header in one line Sorted by RFC 2616: Section 14.9.1 `no-cache` Section 14.9.2 `no-store` Section 14.9.4 `must-revalidate` Combined into one line with IE's `pre-check` and `post-check`. However, when both set to `0`, both are entirely ignored: http://blogs.msdn.com/b/ieinternals/archive/2009/07/20/using-post_2d00_check-and-pre_2d00_check-cache-directives.aspx --- usr/local/www/status_queues.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'usr/local/www/status_queues.php') diff --git a/usr/local/www/status_queues.php b/usr/local/www/status_queues.php index 64e44c2..fd32348 100644 --- a/usr/local/www/status_queues.php +++ b/usr/local/www/status_queues.php @@ -30,7 +30,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* pfSense_BUILDER_BINARIES: /sbin/pfctl pfSense_MODULE: shaper */ @@ -44,14 +44,13 @@ header("Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" ); header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT" ); -header("Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 -header("Cache-Control: post-check=0, pre-check=0", FALSE ); +header("Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0" ); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 require("guiconfig.inc"); class QueueStats { public $queuename; - public $queuelength; + public $queuelength; public $pps; public $bandwidth; public $borrows; @@ -59,7 +58,7 @@ class QueueStats { public $drops; } if (!file_exists("{$g['varrun_path']}/qstats.pid") || !isvalidpid("{$g['varrun_path']}/qstats.pid")) { - /* Start in the background so we don't hang up the GUI */ + /* Start in the background so we don't hang up the GUI */ mwexec_bg("/usr/local/sbin/qstats -p {$g['varrun_path']}/qstats.pid"); /* Give it a moment to start up */ sleep(1); @@ -77,7 +76,7 @@ $fd = @fsockopen("unix://{$g['varrun_path']}/qstats"); if ($altqstats == -1) $error = "No queue statistics could be read."; } -if ($_REQUEST['getactivity']) { +if ($_REQUEST['getactivity']) { $statistics = array(); $bigger_stat = 0; $stat_type = $_REQUEST['stats']; @@ -99,7 +98,7 @@ if ($_REQUEST['getactivity']) { if ($bigger_stat < $q->bandwidth) $bigger_stat = $q->bandwidth; } - } + } $finscript = ""; foreach($statistics as $q) { if ($stat_type == "0") @@ -176,9 +175,9 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < - + - @@ -203,7 +202,7 @@ if(!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < -"; echo ""; echo ""; - echo ""; + echo ""; ?> queuename = $xml['name'] . $xml['interface']; - $current->queuelength = $xml['qlength']; + $current->queuelength = $xml['qlength']; $current->pps = $xml['measured']; $current->bandwidth = $xml['measuredspeedint']; $current->borrows = intval($xml['borrows']); -- cgit v1.1