| @@ 213-219 (lines=7) @@ | ||
| 210 | ||
| 211 | // Check whether the ETag was sent back, and cache based on that... |
|
| 212 | $eTag = '"' . substr($_REQUEST['attach'] . $file['filePath'] . filemtime($file['filePath']), 0, 64) . '"'; |
|
| 213 | if (!empty($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'], $eTag) !== false) |
|
| 214 | { |
|
| 215 | ob_end_clean(); |
|
| 216 | ||
| 217 | header('HTTP/1.1 304 Not Modified'); |
|
| 218 | exit; |
|
| 219 | } |
|
| 220 | ||
| 221 | // If this is a partial download, we need to determine what data range to send |
|
| 222 | $range = 0; |
|
| @@ 1649-1655 (lines=7) @@ | ||
| 1646 | ||
| 1647 | // Check whether the ETag was sent back, and cache based on that... |
|
| 1648 | $eTag = '"' . substr($_REQUEST['attach'] . $real_filename . filemtime($filename), 0, 64) . '"'; |
|
| 1649 | if (!empty($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'], $eTag) !== false) |
|
| 1650 | { |
|
| 1651 | ob_end_clean(); |
|
| 1652 | ||
| 1653 | header('HTTP/1.1 304 Not Modified'); |
|
| 1654 | exit; |
|
| 1655 | } |
|
| 1656 | ||
| 1657 | // Send the attachment headers. |
|
| 1658 | header('Pragma: '); |
|