1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-09 23:56:43 +02:00

Merge pull request #642 from csabahete/master

Set "Vary: Accept-Encoding" header only if encoding is set and not empty
This commit is contained in:
Elan Ruusamäe
2019-09-19 10:30:56 +03:00
committed by GitHub

View File

@@ -128,8 +128,8 @@ class HTTP_ConditionalGet
$etagAppend = '';
if (isset($spec['encoding'])) {
$this->_stripEtag = true;
$this->_headers['Vary'] = 'Accept-Encoding';
if ('' !== $spec['encoding']) {
$this->_headers['Vary'] = 'Accept-Encoding';
if (0 === strpos($spec['encoding'], 'x-')) {
$spec['encoding'] = substr($spec['encoding'], 2);
}