jellyfin-web/dashboard-ui/bower_components/jquery/test/data/if_modified_since.php

21 lines
378 B
PHP
Raw Normal View History

2016-01-14 10:04:42 -07:00
<?php
error_reporting(0);
$ts = $_REQUEST['ts'];
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : false;
if ($ifModifiedSince == $ts) {
header('HTTP/1.0 304 Not Modified');
die; // stop processing
}
header("Last-Modified: " . $ts);
if ( $ifModifiedSince ) {
echo "OK: " . $ts;
} else {
echo "FAIL";
}
?>