mrclay / minify

Combines. minifies, and serves CSS or Javascript files
BSD 3-Clause "New" or "Revised" License
3.01k stars 472 forks source link

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

Closed csabahete closed 5 years ago

csabahete commented 5 years ago

I noticed that in the options provided for the constructor of HTTP_ConditionalGet the encoding option could never be null causing the "Vary: Accept-Encoding" header to be always sent. By this change it will only be set if the encoding has a value different than the empty string.

glensc commented 5 years ago

not sure what you mean...

you mean that second if is superfluous?

if (isset($spec['encoding'])) {
            if ('' !== $spec['encoding']) {