if( is_null($contact)) {
OC_Log::write('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OC_Log::ERROR);
} else {
+ OC_Response::enableCaching();
OC_Contacts_App::setLastModifiedHeader($contact);
// Photo :-)
$expires->add(new DateInterval($interval));
}
if ($expires instanceof DateTime) {
+ $expires->setTimezone(new DateTimeZone('GMT'));
$expires = $expires->format(DateTime::RFC2822);
}
header('Expires: '.$expires);
if (empty($etag)) {
return;
}
- self::enableCaching();
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) {
self::setStatus(self::STATUS_NOT_MODIFIED);
if ($lastModified instanceof DateTime) {
$lastModified = $lastModified->format(DateTime::RFC2822);
}
- self::enableCaching();
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
trim($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $lastModified) {
self::setStatus(self::STATUS_NOT_MODIFIED);