repo.or.cz
/
jquery.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Allowing falsy values to be passed as a speed for show().
[jquery.git]
/
test
/
data
/
etag.php
blob
7bcfcd1e683c402f67cd366acba43d64c518f901
1
<
?php
2
error_reporting
(
0
);
3
4
$ts
=
$_REQUEST
[
'ts'
];
5
$etag
=
md5
(
$ts
);
6
7
$ifNoneMatch
=
isset
(
$_SERVER
[
'HTTP_IF_NONE_MATCH'
])
?
stripslashes
(
$_SERVER
[
'HTTP_IF_NONE_MATCH'
]) :
false
;
8
if
(
$ifNoneMatch
==
$etag
) {
9
header
(
'HTTP/1.0 304 Not Modified'
);
10
die
;
// stop processing
11
}
12
13
header
(
"Etag: "
.
$etag
);
14
15
if
(
$ifNoneMatch
) {
16
echo
"OK: "
.
$etag
;
17
}
else
{
18
echo
"FAIL"
;
19
}
20
21
?
>