Ticket #221 (closed Feature Request: fixed)
Gzipping output
| Reported by: | dlib | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.1 |
| Component: | Core | Version: | SVN HEAD |
| Keywords: | gzip output | Cc: |
Description
Allow for gzipping the output so as to make files smaller and thus faster. In Kohana.php round line 294
if(self::acceptsGZip())
{
header("Content-Encoding: gzip");
print gzencode(self::$output);
}
else
{
print self::$output;
}
}
public function acceptsGZip(){
$accept = str_replace(" ","", strtolower($_SERVER['HTTP_ACCEPT_ENCODING']) );
$accept = explode(",",$accept);
return in_array("gzip",$accept);
}
Of course should be complemented with a config option, or perhaps an argument for Kohana::display()
Change History
Note: See
TracTickets for help on using
tickets.
