header("Etag: ".$etag);
header("Content-Type: ".$content_type);
- if ($content_encoding !== FALSE) {
+ if ($content_encoding !== NULL) {
header("Content-Encoding: ".$content_encoding);
echo $contents;
} else {
public function save($dir, $ext, $contents)
{
- if ($outputs === FALSE) return;
+ if ($contents === FALSE) return;
umask(2); // Group書き込み権限許可
self::browser_accept_encodings(),
['gzip', 'x-gzip']);
- return count($supported_gzip_encodings) > 0 ?
- $supported_gzip_encodings[0] : FALSE;
+ return array_shift($supported_gzip_encodings);
}
}