diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-09-24 15:48:06 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-09-24 15:48:06 +0200 |
commit | 18ee75a9347a56e2a9380ea3a4dcdbf7eb02fd36 (patch) | |
tree | bd9b032b3c6660d9bb7e72dd64f66f006f14907c /application/helpers | |
parent | 853a8d3ce79494f2a34ec408cecaab9c119cb4fb (diff) |
Move etag handling to Main class
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/helpers')
-rw-r--r-- | application/helpers/filebin_helper.php | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php index b3e0e3ed9..847d6d3ae 100644 --- a/application/helpers/filebin_helper.php +++ b/application/helpers/filebin_helper.php @@ -114,28 +114,6 @@ function js_cache_buster() return $ret; } -function handle_etag($etag) -{ - $etag = strtolower($etag); - $modified = true; - - if(isset($_SERVER['HTTP_IF_NONE_MATCH'])) { - $oldtag = trim(strtolower($_SERVER['HTTP_IF_NONE_MATCH']), '"'); - if($oldtag == $etag) { - $modified = false; - } else { - $modified = true; - } - } - - header('Etag: "'.$etag.'"'); - - if (!$modified) { - header("HTTP/1.1 304 Not Modified"); - exit(); - } -} - // Reference: http://php.net/manual/en/features.file-upload.multiple.php#109437 // This is a little different because we don't care about the fieldname function getNormalizedFILES() |