aboutsummaryrefslogtreecommitdiffstats
path: root/test/data/if_modified_since.php
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2012-12-05 14:54:14 +0100
committerjaubourg <j@ubourg.net>2012-12-05 14:54:14 +0100
commitb7ece8c6206d87e71145d1aeefc984e1649af06a (patch)
tree51d47e55f12209926663554b885f3bb395297b91 /test/data/if_modified_since.php
parent6df2900d3a201ba84d56dfb0eb67d4c6e88aaec2 (diff)
downloadjquery-b7ece8c6206d87e71145d1aeefc984e1649af06a.tar.gz
jquery-b7ece8c6206d87e71145d1aeefc984e1649af06a.zip
Revert "Organizes the php scripts used for testing better, so that the whole logic of a unit, server-side and client-side, is contained within the unit itself. Nearly all ajax unit tests take advantage of the new 'framework'. Lots of files got deleted because they became redundant or weren't used anymore."
This reverts commit 228ab3ddae527f72cc3122a1c6115d7718bcfd57.
Diffstat (limited to 'test/data/if_modified_since.php')
-rw-r--r--test/data/if_modified_since.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/data/if_modified_since.php b/test/data/if_modified_since.php
new file mode 100644
index 000000000..098b7da85
--- /dev/null
+++ b/test/data/if_modified_since.php
@@ -0,0 +1,20 @@
+<?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";
+}
+
+?>