@api
Overrides HeaderBag::set
public function set($key, $values, $replace = true) {
parent::set($key, $values, $replace);
$uniqueKey = strtr(strtolower($key), '_', '-');
$this->headerNames[$uniqueKey] = $key;
// ensure the cache-control header has sensible defaults
if (in_array($uniqueKey, array(
'cache-control',
'etag',
'last-modified',
'expires',
))) {
$computed = $this
->computeCacheControlValue();
$this->headers['cache-control'] = array(
$computed,
);
$this->headerNames['cache-control'] = 'Cache-Control';
$this->computedCacheControl = $this
->parseCacheControl($computed);
}
}