mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Optimize the content type search.
Move most commonly used types to the top of the list. This reduces the time spent iterating content types.
This commit is contained in:
parent
37d235fa16
commit
2c1b5d978d
1 changed files with 4 additions and 4 deletions
|
@ -80,6 +80,10 @@ class CakeResponse {
|
|||
* @var array
|
||||
*/
|
||||
protected $_mimeTypes = array(
|
||||
'html' => array('text/html', '*/*'),
|
||||
'json' => 'application/json',
|
||||
'xml' => array('application/xml', 'text/xml'),
|
||||
'rss' => 'application/rss+xml',
|
||||
'ai' => 'application/postscript',
|
||||
'bcpio' => 'application/x-bcpio',
|
||||
'bin' => 'application/octet-stream',
|
||||
|
@ -206,7 +210,6 @@ class CakeResponse {
|
|||
'f90' => 'text/plain',
|
||||
'h' => 'text/plain',
|
||||
'hh' => 'text/plain',
|
||||
'html' => array('text/html', '*/*'),
|
||||
'htm' => array('text/html', '*/*'),
|
||||
'ics' => 'text/calendar',
|
||||
'm' => 'text/plain',
|
||||
|
@ -218,7 +221,6 @@ class CakeResponse {
|
|||
'tpl' => 'text/template',
|
||||
'txt' => 'text/plain',
|
||||
'text' => 'text/plain',
|
||||
'xml' => array('application/xml', 'text/xml'),
|
||||
'avi' => 'video/x-msvideo',
|
||||
'fli' => 'video/x-fli',
|
||||
'mov' => 'video/quicktime',
|
||||
|
@ -261,12 +263,10 @@ class CakeResponse {
|
|||
'pdb' => 'chemical/x-pdb',
|
||||
'xyz' => 'chemical/x-pdb',
|
||||
'javascript' => 'text/javascript',
|
||||
'json' => 'application/json',
|
||||
'form' => 'application/x-www-form-urlencoded',
|
||||
'file' => 'multipart/form-data',
|
||||
'xhtml' => array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'),
|
||||
'xhtml-mobile' => 'application/vnd.wap.xhtml+xml',
|
||||
'rss' => 'application/rss+xml',
|
||||
'atom' => 'application/atom+xml',
|
||||
'amf' => 'application/x-amf',
|
||||
'wap' => array('text/vnd.wap.wml', 'text/vnd.wap.wmlscript', 'image/vnd.wap.wbmp'),
|
||||
|
|
Loading…
Add table
Reference in a new issue