Skip to content
This repository
Browse code

Revert "sort the mimeTypes map alphabetically"

This reverts commit 90ae2df.

The mime type is used by CakeResponse::mapType to determine which mime
type maps to which alias. As this is done in the order of the mimetype
map the mimetype map is order sensitive.
  • Loading branch information...
commit 790a53d7945a57f22876d907cbb835043cf54fc0 1 parent 1758dd1
Andy Dawson authored July 06, 2012

Showing 1 changed file with 115 additions and 115 deletions. Show diff stats Hide diff stats

  1. 230  lib/Cake/Network/CakeResponse.php
230  lib/Cake/Network/CakeResponse.php
@@ -81,31 +81,18 @@ class CakeResponse {
81 81
  */
82 82
 	protected $_mimeTypes = array(
83 83
 		'html' => array('text/html', '*/*'),
84  
-		'7z' => 'application/x-7z-compressed',
85  
-		'aac' => 'audio/aac',
  84
+		'json' => 'application/json',
  85
+		'xml' => array('application/xml', 'text/xml'),
  86
+		'rss' => 'application/rss+xml',
86 87
 		'ai' => 'application/postscript',
87  
-		'aif' => 'audio/x-aiff',
88  
-		'aifc' => 'audio/x-aiff',
89  
-		'aiff' => 'audio/x-aiff',
90  
-		'amf' => 'application/x-amf',
91  
-		'appcache' => 'text/cache-manifest',
92  
-		'asc' => 'text/plain',
93  
-		'atom' => 'application/atom+xml',
94  
-		'au' => 'audio/basic',
95  
-		'avi' => 'video/x-msvideo',
96 88
 		'bcpio' => 'application/x-bcpio',
97 89
 		'bin' => 'application/octet-stream',
98  
-		'bz2' => 'application/x-bzip',
99  
-		'c' => 'text/plain',
100  
-		'cc' => 'text/plain',
101 90
 		'ccad' => 'application/clariscad',
102 91
 		'cdf' => 'application/x-netcdf',
103 92
 		'class' => 'application/octet-stream',
104 93
 		'cpio' => 'application/x-cpio',
105 94
 		'cpt' => 'application/mac-compactpro',
106  
-		'crx' => 'application/x-chrome-extension',
107 95
 		'csh' => 'application/x-csh',
108  
-		'css' => 'text/css',
109 96
 		'csv' => array('text/csv', 'application/vnd.ms-excel', 'text/plain'),
110 97
 		'dcr' => 'application/x-director',
111 98
 		'dir' => 'application/x-director',
@@ -118,111 +105,44 @@ class CakeResponse {
118 105
 		'dxr' => 'application/x-director',
119 106
 		'eot' => 'application/vnd.ms-fontobject',
120 107
 		'eps' => 'application/postscript',
121  
-		'etx' => 'text/x-setext',
122 108
 		'exe' => 'application/octet-stream',
123 109
 		'ez' => 'application/andrew-inset',
124  
-		'f' => 'text/plain',
125  
-		'f4a' => 'audio/mp4',
126  
-		'f4b' => 'audio/mp4',
127  
-		'f4p' => 'video/mp4',
128  
-		'f4v' => 'video/mp4',
129  
-		'f90' => 'text/plain',
130  
-		'file' => 'multipart/form-data',
131  
-		'fli' => 'video/x-fli',
132 110
 		'flv' => 'video/x-flv',
133  
-		'form' => 'application/x-www-form-urlencoded',
134  
-		'gif' => 'image/gif',
135 111
 		'gtar' => 'application/x-gtar',
136 112
 		'gz' => 'application/x-gzip',
137  
-		'h' => 'text/plain',
  113
+		'bz2' => 'application/x-bzip',
  114
+		'7z' => 'application/x-7z-compressed',
138 115
 		'hdf' => 'application/x-hdf',
139  
-		'hh' => 'text/plain',
140 116
 		'hqx' => 'application/mac-binhex40',
141  
-		'htc' => 'text/x-component',
142  
-		'htm' => array('text/html', '*/*'),
143  
-		'ice' => 'x-conference/x-cooltalk',
144 117
 		'ico' => 'image/x-icon',
145  
-		'ics' => 'text/calendar',
146  
-		'ief' => 'image/ief',
147  
-		'iges' => 'model/iges',
148  
-		'igs' => 'model/iges',
149 118
 		'ips' => 'application/x-ipscript',
150 119
 		'ipx' => 'application/x-ipix',
151  
-		'javascript' => 'application/javascript',
152  
-		'jpe' => 'image/jpeg',
153  
-		'jpeg' => 'image/jpeg',
154  
-		'jpg' => 'image/jpeg',
155 120
 		'js' => 'application/javascript',
156  
-		'json' => 'application/json',
157  
-		'kar' => 'audio/midi',
158 121
 		'latex' => 'application/x-latex',
159 122
 		'lha' => 'application/octet-stream',
160 123
 		'lsp' => 'application/x-lisp',
161 124
 		'lzh' => 'application/octet-stream',
162  
-		'm' => 'text/plain',
163  
-		'm4a' => 'audio/mp4',
164  
-		'm4v' => 'video/mp4',
165 125
 		'man' => 'application/x-troff-man',
166  
-		'manifest' => 'text/cache-manifest',
167 126
 		'me' => 'application/x-troff-me',
168  
-		'mesh' => 'model/mesh',
169  
-		'mid' => 'audio/midi',
170  
-		'midi' => 'audio/midi',
171 127
 		'mif' => 'application/vnd.mif',
172  
-		'mime' => 'www/mime',
173  
-		'mov' => 'video/quicktime',
174  
-		'movie' => 'video/x-sgi-movie',
175  
-		'mp2' => 'audio/mpeg',
176  
-		'mp3' => 'audio/mpeg',
177  
-		'mp4' => 'video/mp4',
178  
-		'mpe' => 'video/mpeg',
179  
-		'mpeg' => 'video/mpeg',
180  
-		'mpg' => 'video/mpeg',
181  
-		'mpga' => 'audio/mpeg',
182 128
 		'ms' => 'application/x-troff-ms',
183  
-		'msh' => 'model/mesh',
184 129
 		'nc' => 'application/x-netcdf',
185 130
 		'oda' => 'application/oda',
186  
-		'oex' => 'application/x-opera-extension',
187  
-		'oga' => 'audio/ogg',
188  
-		'ogg' => 'audio/ogg',
189  
-		'ogv' => 'video/ogg',
190 131
 		'otf' => 'font/otf',
191  
-		'pbm' => 'image/x-portable-bitmap',
192  
-		'pdb' => 'chemical/x-pdb',
193 132
 		'pdf' => 'application/pdf',
194  
-		'pgm' => 'image/x-portable-graymap',
195 133
 		'pgn' => 'application/x-chess-pgn',
196  
-		'png' => 'image/png',
197  
-		'pnm' => 'image/x-portable-anymap',
198 134
 		'pot' => 'application/mspowerpoint',
199  
-		'ppm' => 'image/x-portable-pixmap',
200 135
 		'pps' => 'application/mspowerpoint',
201 136
 		'ppt' => 'application/mspowerpoint',
202 137
 		'ppz' => 'application/mspowerpoint',
203 138
 		'pre' => 'application/x-freelance',
204 139
 		'prt' => 'application/pro_eng',
205 140
 		'ps' => 'application/postscript',
206  
-		'qt' => 'video/quicktime',
207  
-		'ra' => 'audio/x-realaudio',
208  
-		'ram' => 'audio/x-pn-realaudio',
209  
-		'ras' => 'image/cmu-raster',
210  
-		'rdf' => 'application/xml',
211  
-		'rgb' => 'image/x-rgb',
212  
-		'rm' => 'audio/x-pn-realaudio',
213 141
 		'roff' => 'application/x-troff',
214  
-		'rpm' => 'audio/x-pn-realaudio-plugin',
215  
-		'rss' => 'application/rss+xml',
216  
-		'rtf' => 'text/rtf',
217  
-		'rtx' => 'text/richtext',
218  
-		'safariextz' => 'application/octet-stream',
219 142
 		'scm' => 'application/x-lotusscreencam',
220 143
 		'set' => 'application/set',
221  
-		'sgm' => 'text/sgml',
222  
-		'sgml' => 'text/sgml',
223 144
 		'sh' => 'application/x-sh',
224 145
 		'shar' => 'application/x-shar',
225  
-		'silo' => 'model/mesh',
226 146
 		'sit' => 'application/x-stuffit',
227 147
 		'skd' => 'application/x-koan',
228 148
 		'skm' => 'application/x-koan',
@@ -230,10 +150,8 @@ class CakeResponse {
230 150
 		'skt' => 'application/x-koan',
231 151
 		'smi' => 'application/smil',
232 152
 		'smil' => 'application/smil',
233  
-		'snd' => 'audio/basic',
234 153
 		'sol' => 'application/solids',
235 154
 		'spl' => 'application/x-futuresplash',
236  
-		'spx' => 'audio/ogg',
237 155
 		'src' => 'application/x-wais-source',
238 156
 		'step' => 'application/STEP',
239 157
 		'stl' => 'application/SLA',
@@ -249,50 +167,132 @@ class CakeResponse {
249 167
 		'tex' => 'application/x-tex',
250 168
 		'texi' => 'application/x-texinfo',
251 169
 		'texinfo' => 'application/x-texinfo',
252  
-		'text' => 'text/plain',
253  
-		'tif' => 'image/tiff',
254  
-		'tiff' => 'image/tiff',
255  
-		'tpl' => 'text/template',
256 170
 		'tr' => 'application/x-troff',
257  
-		'tsi' => 'audio/TSP-audio',
258 171
 		'tsp' => 'application/dsptype',
259  
-		'tsv' => 'text/tab-separated-values',
260 172
 		'ttc' => 'font/ttf',
261 173
 		'ttf' => 'font/ttf',
262  
-		'txt' => 'text/plain',
263 174
 		'unv' => 'application/i-deas',
264 175
 		'ustar' => 'application/x-ustar',
265 176
 		'vcd' => 'application/x-cdlink',
266  
-		'vcf' => 'text/x-vcard',
267 177
 		'vda' => 'application/vda',
268  
-		'viv' => 'video/vnd.vivo',
269  
-		'vivo' => 'video/vnd.vivo',
270  
-		'vrml' => 'model/vrml',
271  
-		'vtt' => 'text/vtt',
272  
-		'wap' => array('text/vnd.wap.wml', 'text/vnd.wap.wmlscript', 'image/vnd.wap.wbmp'),
273  
-		'wav' => 'audio/x-wav',
274  
-		'wbmp' => 'image/vnd.wap.wbmp',
275  
-		'webapp' => 'application/x-web-app-manifest+json',
276  
-		'webm' => 'video/webm',
277  
-		'webp' => 'image/webp',
278  
-		'wml' => 'text/vnd.wap.wml',
279  
-		'wmlscript' => 'text/vnd.wap.wmlscript',
280  
-		'woff' => 'application/x-font-woff',
281  
-		'wrl' => 'model/vrml',
282  
-		'xbm' => 'image/x-xbitmap',
283  
-		'xhtml'	=> array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'),
284  
-		'xhtml-mobile'	=> 'application/vnd.wap.xhtml+xml',
285 178
 		'xlc' => 'application/vnd.ms-excel',
286 179
 		'xll' => 'application/vnd.ms-excel',
287 180
 		'xlm' => 'application/vnd.ms-excel',
288 181
 		'xls' => 'application/vnd.ms-excel',
289 182
 		'xlw' => 'application/vnd.ms-excel',
290  
-		'xml' => array('application/xml', 'text/xml'),
291  
-		'xpi' => 'application/x-xpinstall',
  183
+		'zip' => 'application/zip',
  184
+		'aif' => 'audio/x-aiff',
  185
+		'aifc' => 'audio/x-aiff',
  186
+		'aiff' => 'audio/x-aiff',
  187
+		'au' => 'audio/basic',
  188
+		'kar' => 'audio/midi',
  189
+		'mid' => 'audio/midi',
  190
+		'midi' => 'audio/midi',
  191
+		'mp2' => 'audio/mpeg',
  192
+		'mp3' => 'audio/mpeg',
  193
+		'mpga' => 'audio/mpeg',
  194
+		'ogg' => 'audio/ogg',
  195
+		'oga' => 'audio/ogg',
  196
+		'spx' => 'audio/ogg',
  197
+		'ra' => 'audio/x-realaudio',
  198
+		'ram' => 'audio/x-pn-realaudio',
  199
+		'rm' => 'audio/x-pn-realaudio',
  200
+		'rpm' => 'audio/x-pn-realaudio-plugin',
  201
+		'snd' => 'audio/basic',
  202
+		'tsi' => 'audio/TSP-audio',
  203
+		'wav' => 'audio/x-wav',
  204
+		'aac' => 'audio/aac',
  205
+		'asc' => 'text/plain',
  206
+		'c' => 'text/plain',
  207
+		'cc' => 'text/plain',
  208
+		'css' => 'text/css',
  209
+		'etx' => 'text/x-setext',
  210
+		'f' => 'text/plain',
  211
+		'f90' => 'text/plain',
  212
+		'h' => 'text/plain',
  213
+		'hh' => 'text/plain',
  214
+		'htm' => array('text/html', '*/*'),
  215
+		'ics' => 'text/calendar',
  216
+		'm' => 'text/plain',
  217
+		'rtf' => 'text/rtf',
  218
+		'rtx' => 'text/richtext',
  219
+		'sgm' => 'text/sgml',
  220
+		'sgml' => 'text/sgml',
  221
+		'tsv' => 'text/tab-separated-values',
  222
+		'tpl' => 'text/template',
  223
+		'txt' => 'text/plain',
  224
+		'text' => 'text/plain',
  225
+		'avi' => 'video/x-msvideo',
  226
+		'fli' => 'video/x-fli',
  227
+		'mov' => 'video/quicktime',
  228
+		'movie' => 'video/x-sgi-movie',
  229
+		'mpe' => 'video/mpeg',
  230
+		'mpeg' => 'video/mpeg',
  231
+		'mpg' => 'video/mpeg',
  232
+		'qt' => 'video/quicktime',
  233
+		'viv' => 'video/vnd.vivo',
  234
+		'vivo' => 'video/vnd.vivo',
  235
+		'ogv' => 'video/ogg',
  236
+		'webm' => 'video/webm',
  237
+		'mp4' => 'video/mp4',
  238
+		'm4v' => 'video/mp4',
  239
+		'f4v' => 'video/mp4',
  240
+		'f4p' => 'video/mp4',
  241
+		'm4a' => 'audio/mp4',
  242
+		'f4a' => 'audio/mp4',
  243
+		'f4b' => 'audio/mp4',
  244
+		'gif' => 'image/gif',
  245
+		'ief' => 'image/ief',
  246
+		'jpe' => 'image/jpeg',
  247
+		'jpeg' => 'image/jpeg',
  248
+		'jpg' => 'image/jpeg',
  249
+		'pbm' => 'image/x-portable-bitmap',
  250
+		'pgm' => 'image/x-portable-graymap',
  251
+		'png' => 'image/png',
  252
+		'pnm' => 'image/x-portable-anymap',
  253
+		'ppm' => 'image/x-portable-pixmap',
  254
+		'ras' => 'image/cmu-raster',
  255
+		'rgb' => 'image/x-rgb',
  256
+		'tif' => 'image/tiff',
  257
+		'tiff' => 'image/tiff',
  258
+		'xbm' => 'image/x-xbitmap',
292 259
 		'xpm' => 'image/x-xpixmap',
293 260
 		'xwd' => 'image/x-xwindowdump',
  261
+		'ice' => 'x-conference/x-cooltalk',
  262
+		'iges' => 'model/iges',
  263
+		'igs' => 'model/iges',
  264
+		'mesh' => 'model/mesh',
  265
+		'msh' => 'model/mesh',
  266
+		'silo' => 'model/mesh',
  267
+		'vrml' => 'model/vrml',
  268
+		'wrl' => 'model/vrml',
  269
+		'mime' => 'www/mime',
  270
+		'pdb' => 'chemical/x-pdb',
294 271
 		'xyz' => 'chemical/x-pdb',
295  
-		'zip' => 'application/zip',
  272
+		'javascript' => 'application/javascript',
  273
+		'form' => 'application/x-www-form-urlencoded',
  274
+		'file' => 'multipart/form-data',
  275
+		'xhtml'	=> array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'),
  276
+		'xhtml-mobile'	=> 'application/vnd.wap.xhtml+xml',
  277
+		'atom' => 'application/atom+xml',
  278
+		'amf' => 'application/x-amf',
  279
+		'wap' => array('text/vnd.wap.wml', 'text/vnd.wap.wmlscript', 'image/vnd.wap.wbmp'),
  280
+		'wml' => 'text/vnd.wap.wml',
  281
+		'wmlscript' => 'text/vnd.wap.wmlscript',
  282
+		'wbmp' => 'image/vnd.wap.wbmp',
  283
+		'woff' => 'application/x-font-woff',
  284
+		'webp' => 'image/webp',
  285
+		'appcache' => 'text/cache-manifest',
  286
+		'manifest' => 'text/cache-manifest',
  287
+		'htc' => 'text/x-component',
  288
+		'rdf' => 'application/xml',
  289
+		'crx' => 'application/x-chrome-extension',
  290
+		'oex' => 'application/x-opera-extension',
  291
+		'xpi' => 'application/x-xpinstall',
  292
+		'safariextz' => 'application/octet-stream',
  293
+		'webapp' => 'application/x-web-app-manifest+json',
  294
+		'vcf' => 'text/x-vcard',
  295
+		'vtt' => 'text/vtt',
296 296
 	);
297 297
 
298 298
 /**

0 notes on commit 790a53d

Please sign in to comment.
Something went wrong with that request. Please try again.