Skip to content
Permalink
Browse files

Merge pull request #642 from csabahete/master

Set "Vary: Accept-Encoding" header only if encoding is set and not empty
  • Loading branch information...
glensc committed Sep 19, 2019
2 parents b81ad22 + bd7d107 commit 807f41903e74cf5bf56d84af75a390811121e97f
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/HTTP/ConditionalGet.php
@@ -128,8 +128,8 @@ public function __construct($spec)
$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);
}

0 comments on commit 807f419

Please sign in to comment.
You can’t perform that action at this time.