Fix setEtagHeader function

This commit is contained in:
Bart Visscher 2012-09-07 13:40:30 +02:00
parent cd4b8dbacd
commit 386d1ac49f
1 changed files with 2 additions and 1 deletions

View File

@ -111,12 +111,13 @@ class OC_Response {
if (empty($etag)) {
return;
}
$etag = '"'.$etag.'"';
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) {
self::setStatus(self::STATUS_NOT_MODIFIED);
exit;
}
header('ETag: "'.$etag.'"');
header('ETag: '.$etag);
}
/**