Enable etag in URI by default

This commit is contained in:
Romain Neutron
2013-03-28 15:09:25 +01:00
parent 1a393b7dc7
commit 01baa8f968
4 changed files with 15 additions and 10 deletions

View File

@@ -146,14 +146,15 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea
{
$registry = registry::get_instance();
return sprintf('%spermalink/v1/%d/%d/%s/%s.%s?token=%s',
return sprintf('%spermalink/v1/%d/%d/%s/%s.%s?token=%s&etag=%s',
$registry->get('GV_ServerName'),
$this->media_subdef->get_sbas_id(),
$this->media_subdef->get_record_id(),
$this->media_subdef->get_name(),
$this->get_label(),
pathinfo($this->media_subdef->get_file(), PATHINFO_EXTENSION),
$this->get_token()
$this->get_token(),
$this->media_subdef->getEtag()
);
}

View File

@@ -229,7 +229,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
, 'height' => $this->height
, 'etag' => $this->etag
, 'path' => $this->path
, 'url' => $this->url
, 'url' => $this->url . ($this->is_physically_present ? '?etag=' . $this->etag : '')
, 'file' => $this->file
, 'physically_present' => $this->is_physically_present
, 'is_substituted' => $this->is_substituted