Skip to content
Permalink
Browse files

set "Vary: Accept-Encoding" header only if encoding is set and not empty

  • Loading branch information
Csaba Hete
Csaba Hete committed Nov 6, 2018
1 parent 258e495 commit bd7d1077b39ea93feb433735cd43c2edfb561738
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 bd7d107

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