waitress-core 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/LICENSE +21 -21
- data/Rakefile +13 -13
- data/bin/waitress +22 -22
- data/ext/Thanks.md +1 -1
- data/ext/waitress_http11/ext_help.h +15 -15
- data/ext/waitress_http11/extconf.rb +6 -6
- data/ext/waitress_http11/http11.c +532 -532
- data/ext/waitress_http11/http11_parser.c +1216 -1216
- data/ext/waitress_http11/http11_parser.h +49 -49
- data/ext/waitress_http11/http11_parser.java.rl +171 -171
- data/ext/waitress_http11/http11_parser.rl +165 -165
- data/ext/waitress_http11/http11_parser_common.rl +55 -55
- data/ext/waitress_http11/http11_wrb_parser.h +91 -91
- data/lib/waitress/chef.rb +113 -113
- data/lib/waitress/configure.rb +121 -121
- data/lib/waitress/evalbind.rb +9 -9
- data/lib/waitress/handlers/dirhandler.rb +39 -39
- data/lib/waitress/handlers/handler.rb +57 -57
- data/lib/waitress/handlers/handler404.rb +25 -25
- data/lib/waitress/handlers/libhandler.rb +58 -58
- data/lib/waitress/kernel.rb +182 -182
- data/lib/waitress/parse/query.rb +60 -60
- data/lib/waitress/request.rb +45 -45
- data/lib/waitress/resources/default_config.rb +52 -52
- data/lib/waitress/resources/http/404.html +18 -18
- data/lib/waitress/resources/http/css/hack.css +37 -37
- data/lib/waitress/resources/http/css/waitress.css +57 -57
- data/lib/waitress/resources/http/fonts/svg/latin/hack-bold-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/fonts/svg/latin/hack-bolditalic-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/fonts/svg/latin/hack-italic-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/fonts/svg/latin/hack-regular-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/index.html +15 -15
- data/lib/waitress/response.rb +105 -105
- data/lib/waitress/server.rb +161 -158
- data/lib/waitress/util.rb +707 -707
- data/lib/waitress/version.rb +3 -3
- data/lib/waitress/vhost.rb +217 -217
- data/lib/waitress.rb +106 -106
- data/lib/waitress_http11.so +0 -0
- data/waitress-core.gemspec +29 -29
- metadata +3 -3
- data/lib/waitress_http11.bundle +0 -0
data/lib/waitress/util.rb
CHANGED
@@ -1,707 +1,707 @@
|
|
1
|
-
module Waitress
|
2
|
-
# A small utility class responsible for determining Mime Types and Status responses
|
3
|
-
class Util
|
4
|
-
|
5
|
-
# Match a file extension to a valid Mime Type to be used in Content-Type
|
6
|
-
# headers
|
7
|
-
# +ext+:: The file extension to map
|
8
|
-
# +default+:: The default value to use if a match is not found. Defaults to
|
9
|
-
# application/octet-stream
|
10
|
-
def self.mime ext, default='application/octet-stream'
|
11
|
-
MIME_TYPES.fetch(ext.to_s.downcase, default)
|
12
|
-
end
|
13
|
-
|
14
|
-
# Get the status message for a status code. This matches codes used by the
|
15
|
-
# HTTP protocol to their message, e.g. 200 -> OK, 404 -> Not Found, etc
|
16
|
-
# +code+:: The Status Code to match.
|
17
|
-
def self.status code
|
18
|
-
STATUS[code]
|
19
|
-
end
|
20
|
-
|
21
|
-
STATUS = {
|
22
|
-
100 => "Continue",
|
23
|
-
101 => "Switching Protocols",
|
24
|
-
102 => "Processing",
|
25
|
-
|
26
|
-
200 => "OK",
|
27
|
-
201 => "Created",
|
28
|
-
202 => "Accepted",
|
29
|
-
203 => "Non-Authoritative Information",
|
30
|
-
204 => "No Content",
|
31
|
-
205 => "Reset Content",
|
32
|
-
206 => "Partial Content",
|
33
|
-
207 => "Multi-Status",
|
34
|
-
208 => "Already Reported",
|
35
|
-
226 => "IM Used",
|
36
|
-
|
37
|
-
300 => "Multiple Choices",
|
38
|
-
301 => "Moved Permanently",
|
39
|
-
302 => "Found",
|
40
|
-
303 => "See Other",
|
41
|
-
304 => "Not Modified",
|
42
|
-
305 => "Use Proxy",
|
43
|
-
307 => "Temporary Redirect",
|
44
|
-
308 => "Permanent Redirect",
|
45
|
-
|
46
|
-
400 => "Bad Request",
|
47
|
-
401 => "Unauthorized",
|
48
|
-
403 => "Forbidden",
|
49
|
-
404 => "Not Found",
|
50
|
-
405 => "Method Not Allowed",
|
51
|
-
406 => "Not Acceptable",
|
52
|
-
407 => "Proxy Authentication Required",
|
53
|
-
408 => "Request Timeout",
|
54
|
-
409 => "Conflict",
|
55
|
-
410 => "Gone",
|
56
|
-
411 => "Length Required",
|
57
|
-
412 => "Precondition Failed",
|
58
|
-
413 => "Payload Too Large",
|
59
|
-
414 => "Request-URI Too Long",
|
60
|
-
415 => "Unsupported Media Type",
|
61
|
-
416 => "Requested Range Not Satifiable",
|
62
|
-
417 => "Expectation Failed",
|
63
|
-
418 => "I'm a teapot",
|
64
|
-
426 => "Update Required",
|
65
|
-
429 => "Too Many Requests",
|
66
|
-
|
67
|
-
500 => "Internal Server Error",
|
68
|
-
501 => "Not Implemented",
|
69
|
-
502 => "Bad Gateway",
|
70
|
-
503 => "Service Unavailable",
|
71
|
-
504 => "Gateway Timeout",
|
72
|
-
505 => "HTTP Version Not Supported",
|
73
|
-
520 => "Unknown Error"
|
74
|
-
}
|
75
|
-
|
76
|
-
# Taken from Rack::Mime
|
77
|
-
MIME_TYPES = {
|
78
|
-
".123" => "application/vnd.lotus-1-2-3",
|
79
|
-
".3dml" => "text/vnd.in3d.3dml",
|
80
|
-
".3g2" => "video/3gpp2",
|
81
|
-
".3gp" => "video/3gpp",
|
82
|
-
".a" => "application/octet-stream",
|
83
|
-
".acc" => "application/vnd.americandynamics.acc",
|
84
|
-
".ace" => "application/x-ace-compressed",
|
85
|
-
".acu" => "application/vnd.acucobol",
|
86
|
-
".aep" => "application/vnd.audiograph",
|
87
|
-
".afp" => "application/vnd.ibm.modcap",
|
88
|
-
".ai" => "application/postscript",
|
89
|
-
".aif" => "audio/x-aiff",
|
90
|
-
".aiff" => "audio/x-aiff",
|
91
|
-
".ami" => "application/vnd.amiga.ami",
|
92
|
-
".appcache" => "text/cache-manifest",
|
93
|
-
".apr" => "application/vnd.lotus-approach",
|
94
|
-
".asc" => "application/pgp-signature",
|
95
|
-
".asf" => "video/x-ms-asf",
|
96
|
-
".asm" => "text/x-asm",
|
97
|
-
".aso" => "application/vnd.accpac.simply.aso",
|
98
|
-
".asx" => "video/x-ms-asf",
|
99
|
-
".atc" => "application/vnd.acucorp",
|
100
|
-
".atom" => "application/atom+xml",
|
101
|
-
".atomcat" => "application/atomcat+xml",
|
102
|
-
".atomsvc" => "application/atomsvc+xml",
|
103
|
-
".atx" => "application/vnd.antix.game-component",
|
104
|
-
".au" => "audio/basic",
|
105
|
-
".avi" => "video/x-msvideo",
|
106
|
-
".bat" => "application/x-msdownload",
|
107
|
-
".bcpio" => "application/x-bcpio",
|
108
|
-
".bdm" => "application/vnd.syncml.dm+wbxml",
|
109
|
-
".bh2" => "application/vnd.fujitsu.oasysprs",
|
110
|
-
".bin" => "application/octet-stream",
|
111
|
-
".bmi" => "application/vnd.bmi",
|
112
|
-
".bmp" => "image/bmp",
|
113
|
-
".box" => "application/vnd.previewsystems.box",
|
114
|
-
".btif" => "image/prs.btif",
|
115
|
-
".bz" => "application/x-bzip",
|
116
|
-
".bz2" => "application/x-bzip2",
|
117
|
-
".c" => "text/x-c",
|
118
|
-
".c4g" => "application/vnd.clonk.c4group",
|
119
|
-
".cab" => "application/vnd.ms-cab-compressed",
|
120
|
-
".cc" => "text/x-c",
|
121
|
-
".ccxml" => "application/ccxml+xml",
|
122
|
-
".cdbcmsg" => "application/vnd.contact.cmsg",
|
123
|
-
".cdkey" => "application/vnd.mediastation.cdkey",
|
124
|
-
".cdx" => "chemical/x-cdx",
|
125
|
-
".cdxml" => "application/vnd.chemdraw+xml",
|
126
|
-
".cdy" => "application/vnd.cinderella",
|
127
|
-
".cer" => "application/pkix-cert",
|
128
|
-
".cgm" => "image/cgm",
|
129
|
-
".chat" => "application/x-chat",
|
130
|
-
".chm" => "application/vnd.ms-htmlhelp",
|
131
|
-
".chrt" => "application/vnd.kde.kchart",
|
132
|
-
".cif" => "chemical/x-cif",
|
133
|
-
".cii" => "application/vnd.anser-web-certificate-issue-initiation",
|
134
|
-
".cil" => "application/vnd.ms-artgalry",
|
135
|
-
".cla" => "application/vnd.claymore",
|
136
|
-
".class" => "application/octet-stream",
|
137
|
-
".clkk" => "application/vnd.crick.clicker.keyboard",
|
138
|
-
".clkp" => "application/vnd.crick.clicker.palette",
|
139
|
-
".clkt" => "application/vnd.crick.clicker.template",
|
140
|
-
".clkw" => "application/vnd.crick.clicker.wordbank",
|
141
|
-
".clkx" => "application/vnd.crick.clicker",
|
142
|
-
".clp" => "application/x-msclip",
|
143
|
-
".cmc" => "application/vnd.cosmocaller",
|
144
|
-
".cmdf" => "chemical/x-cmdf",
|
145
|
-
".cml" => "chemical/x-cml",
|
146
|
-
".cmp" => "application/vnd.yellowriver-custom-menu",
|
147
|
-
".cmx" => "image/x-cmx",
|
148
|
-
".com" => "application/x-msdownload",
|
149
|
-
".conf" => "text/plain",
|
150
|
-
".cpio" => "application/x-cpio",
|
151
|
-
".cpp" => "text/x-c",
|
152
|
-
".cpt" => "application/mac-compactpro",
|
153
|
-
".crd" => "application/x-mscardfile",
|
154
|
-
".crl" => "application/pkix-crl",
|
155
|
-
".crt" => "application/x-x509-ca-cert",
|
156
|
-
".csh" => "application/x-csh",
|
157
|
-
".csml" => "chemical/x-csml",
|
158
|
-
".csp" => "application/vnd.commonspace",
|
159
|
-
".css" => "text/css",
|
160
|
-
".csv" => "text/csv",
|
161
|
-
".curl" => "application/vnd.curl",
|
162
|
-
".cww" => "application/prs.cww",
|
163
|
-
".cxx" => "text/x-c",
|
164
|
-
".daf" => "application/vnd.mobius.daf",
|
165
|
-
".davmount" => "application/davmount+xml",
|
166
|
-
".dcr" => "application/x-director",
|
167
|
-
".dd2" => "application/vnd.oma.dd2+xml",
|
168
|
-
".ddd" => "application/vnd.fujixerox.ddd",
|
169
|
-
".deb" => "application/x-debian-package",
|
170
|
-
".der" => "application/x-x509-ca-cert",
|
171
|
-
".dfac" => "application/vnd.dreamfactory",
|
172
|
-
".diff" => "text/x-diff",
|
173
|
-
".dis" => "application/vnd.mobius.dis",
|
174
|
-
".djv" => "image/vnd.djvu",
|
175
|
-
".djvu" => "image/vnd.djvu",
|
176
|
-
".dll" => "application/x-msdownload",
|
177
|
-
".dmg" => "application/octet-stream",
|
178
|
-
".dna" => "application/vnd.dna",
|
179
|
-
".doc" => "application/msword",
|
180
|
-
".docm" => "application/vnd.ms-word.document.macroEnabled.12",
|
181
|
-
".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
182
|
-
".dot" => "application/msword",
|
183
|
-
".dotm" => "application/vnd.ms-word.template.macroEnabled.12",
|
184
|
-
".dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
|
185
|
-
".dp" => "application/vnd.osgi.dp",
|
186
|
-
".dpg" => "application/vnd.dpgraph",
|
187
|
-
".dsc" => "text/prs.lines.tag",
|
188
|
-
".dtd" => "application/xml-dtd",
|
189
|
-
".dts" => "audio/vnd.dts",
|
190
|
-
".dtshd" => "audio/vnd.dts.hd",
|
191
|
-
".dv" => "video/x-dv",
|
192
|
-
".dvi" => "application/x-dvi",
|
193
|
-
".dwf" => "model/vnd.dwf",
|
194
|
-
".dwg" => "image/vnd.dwg",
|
195
|
-
".dxf" => "image/vnd.dxf",
|
196
|
-
".dxp" => "application/vnd.spotfire.dxp",
|
197
|
-
".ear" => "application/java-archive",
|
198
|
-
".ecelp4800" => "audio/vnd.nuera.ecelp4800",
|
199
|
-
".ecelp7470" => "audio/vnd.nuera.ecelp7470",
|
200
|
-
".ecelp9600" => "audio/vnd.nuera.ecelp9600",
|
201
|
-
".ecma" => "application/ecmascript",
|
202
|
-
".edm" => "application/vnd.novadigm.edm",
|
203
|
-
".edx" => "application/vnd.novadigm.edx",
|
204
|
-
".efif" => "application/vnd.picsel",
|
205
|
-
".ei6" => "application/vnd.pg.osasli",
|
206
|
-
".eml" => "message/rfc822",
|
207
|
-
".eol" => "audio/vnd.digital-winds",
|
208
|
-
".eot" => "application/vnd.ms-fontobject",
|
209
|
-
".eps" => "application/postscript",
|
210
|
-
".es3" => "application/vnd.eszigno3+xml",
|
211
|
-
".esf" => "application/vnd.epson.esf",
|
212
|
-
".etx" => "text/x-setext",
|
213
|
-
".exe" => "application/x-msdownload",
|
214
|
-
".ext" => "application/vnd.novadigm.ext",
|
215
|
-
".ez" => "application/andrew-inset",
|
216
|
-
".ez2" => "application/vnd.ezpix-album",
|
217
|
-
".ez3" => "application/vnd.ezpix-package",
|
218
|
-
".f" => "text/x-fortran",
|
219
|
-
".f77" => "text/x-fortran",
|
220
|
-
".f90" => "text/x-fortran",
|
221
|
-
".fbs" => "image/vnd.fastbidsheet",
|
222
|
-
".fdf" => "application/vnd.fdf",
|
223
|
-
".fe_launch" => "application/vnd.denovo.fcselayout-link",
|
224
|
-
".fg5" => "application/vnd.fujitsu.oasysgp",
|
225
|
-
".fli" => "video/x-fli",
|
226
|
-
".flo" => "application/vnd.micrografx.flo",
|
227
|
-
".flv" => "video/x-flv",
|
228
|
-
".flw" => "application/vnd.kde.kivio",
|
229
|
-
".flx" => "text/vnd.fmi.flexstor",
|
230
|
-
".fly" => "text/vnd.fly",
|
231
|
-
".fm" => "application/vnd.framemaker",
|
232
|
-
".fnc" => "application/vnd.frogans.fnc",
|
233
|
-
".for" => "text/x-fortran",
|
234
|
-
".fpx" => "image/vnd.fpx",
|
235
|
-
".fsc" => "application/vnd.fsc.weblaunch",
|
236
|
-
".fst" => "image/vnd.fst",
|
237
|
-
".ftc" => "application/vnd.fluxtime.clip",
|
238
|
-
".fti" => "application/vnd.anser-web-funds-transfer-initiation",
|
239
|
-
".fvt" => "video/vnd.fvt",
|
240
|
-
".fzs" => "application/vnd.fuzzysheet",
|
241
|
-
".g3" => "image/g3fax",
|
242
|
-
".gac" => "application/vnd.groove-account",
|
243
|
-
".gdl" => "model/vnd.gdl",
|
244
|
-
".gem" => "application/octet-stream",
|
245
|
-
".gemspec" => "text/x-script.ruby",
|
246
|
-
".ghf" => "application/vnd.groove-help",
|
247
|
-
".gif" => "image/gif",
|
248
|
-
".gim" => "application/vnd.groove-identity-message",
|
249
|
-
".gmx" => "application/vnd.gmx",
|
250
|
-
".gph" => "application/vnd.flographit",
|
251
|
-
".gqf" => "application/vnd.grafeq",
|
252
|
-
".gram" => "application/srgs",
|
253
|
-
".grv" => "application/vnd.groove-injector",
|
254
|
-
".grxml" => "application/srgs+xml",
|
255
|
-
".gtar" => "application/x-gtar",
|
256
|
-
".gtm" => "application/vnd.groove-tool-message",
|
257
|
-
".gtw" => "model/vnd.gtw",
|
258
|
-
".gv" => "text/vnd.graphviz",
|
259
|
-
".gz" => "application/x-gzip",
|
260
|
-
".h" => "text/x-c",
|
261
|
-
".h261" => "video/h261",
|
262
|
-
".h263" => "video/h263",
|
263
|
-
".h264" => "video/h264",
|
264
|
-
".hbci" => "application/vnd.hbci",
|
265
|
-
".hdf" => "application/x-hdf",
|
266
|
-
".hh" => "text/x-c",
|
267
|
-
".hlp" => "application/winhlp",
|
268
|
-
".hpgl" => "application/vnd.hp-hpgl",
|
269
|
-
".hpid" => "application/vnd.hp-hpid",
|
270
|
-
".hps" => "application/vnd.hp-hps",
|
271
|
-
".hqx" => "application/mac-binhex40",
|
272
|
-
".htc" => "text/x-component",
|
273
|
-
".htke" => "application/vnd.kenameaapp",
|
274
|
-
".htm" => "text/html",
|
275
|
-
".html" => "text/html",
|
276
|
-
".hvd" => "application/vnd.yamaha.hv-dic",
|
277
|
-
".hvp" => "application/vnd.yamaha.hv-voice",
|
278
|
-
".hvs" => "application/vnd.yamaha.hv-script",
|
279
|
-
".icc" => "application/vnd.iccprofile",
|
280
|
-
".ice" => "x-conference/x-cooltalk",
|
281
|
-
".ico" => "image/vnd.microsoft.icon",
|
282
|
-
".ics" => "text/calendar",
|
283
|
-
".ief" => "image/ief",
|
284
|
-
".ifb" => "text/calendar",
|
285
|
-
".ifm" => "application/vnd.shana.informed.formdata",
|
286
|
-
".igl" => "application/vnd.igloader",
|
287
|
-
".igs" => "model/iges",
|
288
|
-
".igx" => "application/vnd.micrografx.igx",
|
289
|
-
".iif" => "application/vnd.shana.informed.interchange",
|
290
|
-
".imp" => "application/vnd.accpac.simply.imp",
|
291
|
-
".ims" => "application/vnd.ms-ims",
|
292
|
-
".ipk" => "application/vnd.shana.informed.package",
|
293
|
-
".irm" => "application/vnd.ibm.rights-management",
|
294
|
-
".irp" => "application/vnd.irepository.package+xml",
|
295
|
-
".iso" => "application/octet-stream",
|
296
|
-
".itp" => "application/vnd.shana.informed.formtemplate",
|
297
|
-
".ivp" => "application/vnd.immervision-ivp",
|
298
|
-
".ivu" => "application/vnd.immervision-ivu",
|
299
|
-
".jad" => "text/vnd.sun.j2me.app-descriptor",
|
300
|
-
".jam" => "application/vnd.jam",
|
301
|
-
".jar" => "application/java-archive",
|
302
|
-
".java" => "text/x-java-source",
|
303
|
-
".jisp" => "application/vnd.jisp",
|
304
|
-
".jlt" => "application/vnd.hp-jlyt",
|
305
|
-
".jnlp" => "application/x-java-jnlp-file",
|
306
|
-
".joda" => "application/vnd.joost.joda-archive",
|
307
|
-
".jp2" => "image/jp2",
|
308
|
-
".jpeg" => "image/jpeg",
|
309
|
-
".jpg" => "image/jpeg",
|
310
|
-
".jpgv" => "video/jpeg",
|
311
|
-
".jpm" => "video/jpm",
|
312
|
-
".js" => "application/javascript",
|
313
|
-
".json" => "application/json",
|
314
|
-
".karbon" => "application/vnd.kde.karbon",
|
315
|
-
".kfo" => "application/vnd.kde.kformula",
|
316
|
-
".kia" => "application/vnd.kidspiration",
|
317
|
-
".kml" => "application/vnd.google-earth.kml+xml",
|
318
|
-
".kmz" => "application/vnd.google-earth.kmz",
|
319
|
-
".kne" => "application/vnd.kinar",
|
320
|
-
".kon" => "application/vnd.kde.kontour",
|
321
|
-
".kpr" => "application/vnd.kde.kpresenter",
|
322
|
-
".ksp" => "application/vnd.kde.kspread",
|
323
|
-
".ktz" => "application/vnd.kahootz",
|
324
|
-
".kwd" => "application/vnd.kde.kword",
|
325
|
-
".latex" => "application/x-latex",
|
326
|
-
".lbd" => "application/vnd.llamagraphics.life-balance.desktop",
|
327
|
-
".lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
|
328
|
-
".les" => "application/vnd.hhe.lesson-player",
|
329
|
-
".link66" => "application/vnd.route66.link66+xml",
|
330
|
-
".log" => "text/plain",
|
331
|
-
".lostxml" => "application/lost+xml",
|
332
|
-
".lrm" => "application/vnd.ms-lrm",
|
333
|
-
".ltf" => "application/vnd.frogans.ltf",
|
334
|
-
".lvp" => "audio/vnd.lucent.voice",
|
335
|
-
".lwp" => "application/vnd.lotus-wordpro",
|
336
|
-
".m3u" => "audio/x-mpegurl",
|
337
|
-
".m4a" => "audio/mp4a-latm",
|
338
|
-
".m4v" => "video/mp4",
|
339
|
-
".ma" => "application/mathematica",
|
340
|
-
".mag" => "application/vnd.ecowin.chart",
|
341
|
-
".man" => "text/troff",
|
342
|
-
".manifest" => "text/cache-manifest",
|
343
|
-
".mathml" => "application/mathml+xml",
|
344
|
-
".mbk" => "application/vnd.mobius.mbk",
|
345
|
-
".mbox" => "application/mbox",
|
346
|
-
".mc1" => "application/vnd.medcalcdata",
|
347
|
-
".mcd" => "application/vnd.mcd",
|
348
|
-
".mdb" => "application/x-msaccess",
|
349
|
-
".mdi" => "image/vnd.ms-modi",
|
350
|
-
".mdoc" => "text/troff",
|
351
|
-
".me" => "text/troff",
|
352
|
-
".mfm" => "application/vnd.mfmp",
|
353
|
-
".mgz" => "application/vnd.proteus.magazine",
|
354
|
-
".mid" => "audio/midi",
|
355
|
-
".midi" => "audio/midi",
|
356
|
-
".mif" => "application/vnd.mif",
|
357
|
-
".mime" => "message/rfc822",
|
358
|
-
".mj2" => "video/mj2",
|
359
|
-
".mlp" => "application/vnd.dolby.mlp",
|
360
|
-
".mmd" => "application/vnd.chipnuts.karaoke-mmd",
|
361
|
-
".mmf" => "application/vnd.smaf",
|
362
|
-
".mml" => "application/mathml+xml",
|
363
|
-
".mmr" => "image/vnd.fujixerox.edmics-mmr",
|
364
|
-
".mng" => "video/x-mng",
|
365
|
-
".mny" => "application/x-msmoney",
|
366
|
-
".mov" => "video/quicktime",
|
367
|
-
".movie" => "video/x-sgi-movie",
|
368
|
-
".mp3" => "audio/mpeg",
|
369
|
-
".mp4" => "video/mp4",
|
370
|
-
".mp4a" => "audio/mp4",
|
371
|
-
".mp4s" => "application/mp4",
|
372
|
-
".mp4v" => "video/mp4",
|
373
|
-
".mpc" => "application/vnd.mophun.certificate",
|
374
|
-
".mpeg" => "video/mpeg",
|
375
|
-
".mpg" => "video/mpeg",
|
376
|
-
".mpga" => "audio/mpeg",
|
377
|
-
".mpkg" => "application/vnd.apple.installer+xml",
|
378
|
-
".mpm" => "application/vnd.blueice.multipass",
|
379
|
-
".mpn" => "application/vnd.mophun.application",
|
380
|
-
".mpp" => "application/vnd.ms-project",
|
381
|
-
".mpy" => "application/vnd.ibm.minipay",
|
382
|
-
".mqy" => "application/vnd.mobius.mqy",
|
383
|
-
".mrc" => "application/marc",
|
384
|
-
".ms" => "text/troff",
|
385
|
-
".mscml" => "application/mediaservercontrol+xml",
|
386
|
-
".mseq" => "application/vnd.mseq",
|
387
|
-
".msf" => "application/vnd.epson.msf",
|
388
|
-
".msh" => "model/mesh",
|
389
|
-
".msi" => "application/x-msdownload",
|
390
|
-
".msl" => "application/vnd.mobius.msl",
|
391
|
-
".msty" => "application/vnd.muvee.style",
|
392
|
-
".mts" => "model/vnd.mts",
|
393
|
-
".mus" => "application/vnd.musician",
|
394
|
-
".mvb" => "application/x-msmediaview",
|
395
|
-
".mwf" => "application/vnd.mfer",
|
396
|
-
".mxf" => "application/mxf",
|
397
|
-
".mxl" => "application/vnd.recordare.musicxml",
|
398
|
-
".mxml" => "application/xv+xml",
|
399
|
-
".mxs" => "application/vnd.triscape.mxs",
|
400
|
-
".mxu" => "video/vnd.mpegurl",
|
401
|
-
".n" => "application/vnd.nokia.n-gage.symbian.install",
|
402
|
-
".nc" => "application/x-netcdf",
|
403
|
-
".ngdat" => "application/vnd.nokia.n-gage.data",
|
404
|
-
".nlu" => "application/vnd.neurolanguage.nlu",
|
405
|
-
".nml" => "application/vnd.enliven",
|
406
|
-
".nnd" => "application/vnd.noblenet-directory",
|
407
|
-
".nns" => "application/vnd.noblenet-sealer",
|
408
|
-
".nnw" => "application/vnd.noblenet-web",
|
409
|
-
".npx" => "image/vnd.net-fpx",
|
410
|
-
".nsf" => "application/vnd.lotus-notes",
|
411
|
-
".oa2" => "application/vnd.fujitsu.oasys2",
|
412
|
-
".oa3" => "application/vnd.fujitsu.oasys3",
|
413
|
-
".oas" => "application/vnd.fujitsu.oasys",
|
414
|
-
".obd" => "application/x-msbinder",
|
415
|
-
".oda" => "application/oda",
|
416
|
-
".odc" => "application/vnd.oasis.opendocument.chart",
|
417
|
-
".odf" => "application/vnd.oasis.opendocument.formula",
|
418
|
-
".odg" => "application/vnd.oasis.opendocument.graphics",
|
419
|
-
".odi" => "application/vnd.oasis.opendocument.image",
|
420
|
-
".odp" => "application/vnd.oasis.opendocument.presentation",
|
421
|
-
".ods" => "application/vnd.oasis.opendocument.spreadsheet",
|
422
|
-
".odt" => "application/vnd.oasis.opendocument.text",
|
423
|
-
".oga" => "audio/ogg",
|
424
|
-
".ogg" => "application/ogg",
|
425
|
-
".ogv" => "video/ogg",
|
426
|
-
".ogx" => "application/ogg",
|
427
|
-
".org" => "application/vnd.lotus-organizer",
|
428
|
-
".otc" => "application/vnd.oasis.opendocument.chart-template",
|
429
|
-
".otf" => "application/vnd.oasis.opendocument.formula-template",
|
430
|
-
".otg" => "application/vnd.oasis.opendocument.graphics-template",
|
431
|
-
".oth" => "application/vnd.oasis.opendocument.text-web",
|
432
|
-
".oti" => "application/vnd.oasis.opendocument.image-template",
|
433
|
-
".otm" => "application/vnd.oasis.opendocument.text-master",
|
434
|
-
".ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
|
435
|
-
".ott" => "application/vnd.oasis.opendocument.text-template",
|
436
|
-
".oxt" => "application/vnd.openofficeorg.extension",
|
437
|
-
".p" => "text/x-pascal",
|
438
|
-
".p10" => "application/pkcs10",
|
439
|
-
".p12" => "application/x-pkcs12",
|
440
|
-
".p7b" => "application/x-pkcs7-certificates",
|
441
|
-
".p7m" => "application/pkcs7-mime",
|
442
|
-
".p7r" => "application/x-pkcs7-certreqresp",
|
443
|
-
".p7s" => "application/pkcs7-signature",
|
444
|
-
".pas" => "text/x-pascal",
|
445
|
-
".pbd" => "application/vnd.powerbuilder6",
|
446
|
-
".pbm" => "image/x-portable-bitmap",
|
447
|
-
".pcl" => "application/vnd.hp-pcl",
|
448
|
-
".pclxl" => "application/vnd.hp-pclxl",
|
449
|
-
".pcx" => "image/x-pcx",
|
450
|
-
".pdb" => "chemical/x-pdb",
|
451
|
-
".pdf" => "application/pdf",
|
452
|
-
".pem" => "application/x-x509-ca-cert",
|
453
|
-
".pfr" => "application/font-tdpfr",
|
454
|
-
".pgm" => "image/x-portable-graymap",
|
455
|
-
".pgn" => "application/x-chess-pgn",
|
456
|
-
".pgp" => "application/pgp-encrypted",
|
457
|
-
".pic" => "image/x-pict",
|
458
|
-
".pict" => "image/pict",
|
459
|
-
".pkg" => "application/octet-stream",
|
460
|
-
".pki" => "application/pkixcmp",
|
461
|
-
".pkipath" => "application/pkix-pkipath",
|
462
|
-
".pl" => "text/x-script.perl",
|
463
|
-
".plb" => "application/vnd.3gpp.pic-bw-large",
|
464
|
-
".plc" => "application/vnd.mobius.plc",
|
465
|
-
".plf" => "application/vnd.pocketlearn",
|
466
|
-
".pls" => "application/pls+xml",
|
467
|
-
".pm" => "text/x-script.perl-module",
|
468
|
-
".pml" => "application/vnd.ctc-posml",
|
469
|
-
".png" => "image/png",
|
470
|
-
".pnm" => "image/x-portable-anymap",
|
471
|
-
".pntg" => "image/x-macpaint",
|
472
|
-
".portpkg" => "application/vnd.macports.portpkg",
|
473
|
-
".pot" => "application/vnd.ms-powerpoint",
|
474
|
-
".potm" => "application/vnd.ms-powerpoint.template.macroEnabled.12",
|
475
|
-
".potx" => "application/vnd.openxmlformats-officedocument.presentationml.template",
|
476
|
-
".ppa" => "application/vnd.ms-powerpoint",
|
477
|
-
".ppam" => "application/vnd.ms-powerpoint.addin.macroEnabled.12",
|
478
|
-
".ppd" => "application/vnd.cups-ppd",
|
479
|
-
".ppm" => "image/x-portable-pixmap",
|
480
|
-
".pps" => "application/vnd.ms-powerpoint",
|
481
|
-
".ppsm" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
|
482
|
-
".ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
483
|
-
".ppt" => "application/vnd.ms-powerpoint",
|
484
|
-
".pptm" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
485
|
-
".pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
486
|
-
".prc" => "application/vnd.palm",
|
487
|
-
".pre" => "application/vnd.lotus-freelance",
|
488
|
-
".prf" => "application/pics-rules",
|
489
|
-
".ps" => "application/postscript",
|
490
|
-
".psb" => "application/vnd.3gpp.pic-bw-small",
|
491
|
-
".psd" => "image/vnd.adobe.photoshop",
|
492
|
-
".ptid" => "application/vnd.pvi.ptid1",
|
493
|
-
".pub" => "application/x-mspublisher",
|
494
|
-
".pvb" => "application/vnd.3gpp.pic-bw-var",
|
495
|
-
".pwn" => "application/vnd.3m.post-it-notes",
|
496
|
-
".py" => "text/x-script.python",
|
497
|
-
".pya" => "audio/vnd.ms-playready.media.pya",
|
498
|
-
".pyv" => "video/vnd.ms-playready.media.pyv",
|
499
|
-
".qam" => "application/vnd.epson.quickanime",
|
500
|
-
".qbo" => "application/vnd.intu.qbo",
|
501
|
-
".qfx" => "application/vnd.intu.qfx",
|
502
|
-
".qps" => "application/vnd.publishare-delta-tree",
|
503
|
-
".qt" => "video/quicktime",
|
504
|
-
".qtif" => "image/x-quicktime",
|
505
|
-
".qxd" => "application/vnd.quark.quarkxpress",
|
506
|
-
".ra" => "audio/x-pn-realaudio",
|
507
|
-
".rake" => "text/x-script.ruby",
|
508
|
-
".ram" => "audio/x-pn-realaudio",
|
509
|
-
".rar" => "application/x-rar-compressed",
|
510
|
-
".ras" => "image/x-cmu-raster",
|
511
|
-
".rb" => "text/x-script.ruby",
|
512
|
-
".rcprofile" => "application/vnd.ipunplugged.rcprofile",
|
513
|
-
".rdf" => "application/rdf+xml",
|
514
|
-
".rdz" => "application/vnd.data-vision.rdz",
|
515
|
-
".rep" => "application/vnd.businessobjects",
|
516
|
-
".rgb" => "image/x-rgb",
|
517
|
-
".rif" => "application/reginfo+xml",
|
518
|
-
".rl" => "application/resource-lists+xml",
|
519
|
-
".rlc" => "image/vnd.fujixerox.edmics-rlc",
|
520
|
-
".rld" => "application/resource-lists-diff+xml",
|
521
|
-
".rm" => "application/vnd.rn-realmedia",
|
522
|
-
".rmp" => "audio/x-pn-realaudio-plugin",
|
523
|
-
".rms" => "application/vnd.jcp.javame.midlet-rms",
|
524
|
-
".rnc" => "application/relax-ng-compact-syntax",
|
525
|
-
".roff" => "text/troff",
|
526
|
-
".rpm" => "application/x-redhat-package-manager",
|
527
|
-
".rpss" => "application/vnd.nokia.radio-presets",
|
528
|
-
".rpst" => "application/vnd.nokia.radio-preset",
|
529
|
-
".rq" => "application/sparql-query",
|
530
|
-
".rs" => "application/rls-services+xml",
|
531
|
-
".rsd" => "application/rsd+xml",
|
532
|
-
".rss" => "application/rss+xml",
|
533
|
-
".rtf" => "application/rtf",
|
534
|
-
".rtx" => "text/richtext",
|
535
|
-
".ru" => "text/x-script.ruby",
|
536
|
-
".s" => "text/x-asm",
|
537
|
-
".saf" => "application/vnd.yamaha.smaf-audio",
|
538
|
-
".sbml" => "application/sbml+xml",
|
539
|
-
".sc" => "application/vnd.ibm.secure-container",
|
540
|
-
".scd" => "application/x-msschedule",
|
541
|
-
".scm" => "application/vnd.lotus-screencam",
|
542
|
-
".scon" => "application/scon",
|
543
|
-
".scq" => "application/scvp-cv-request",
|
544
|
-
".scs" => "application/scvp-cv-response",
|
545
|
-
".sdkm" => "application/vnd.solent.sdkm+xml",
|
546
|
-
".sdp" => "application/sdp",
|
547
|
-
".see" => "application/vnd.seemail",
|
548
|
-
".sema" => "application/vnd.sema",
|
549
|
-
".semd" => "application/vnd.semd",
|
550
|
-
".semf" => "application/vnd.semf",
|
551
|
-
".setpay" => "application/set-payment-initiation",
|
552
|
-
".setreg" => "application/set-registration-initiation",
|
553
|
-
".sfd" => "application/vnd.hydrostatix.sof-data",
|
554
|
-
".sfs" => "application/vnd.spotfire.sfs",
|
555
|
-
".sgm" => "text/sgml",
|
556
|
-
".sgml" => "text/sgml",
|
557
|
-
".sh" => "application/x-sh",
|
558
|
-
".shar" => "application/x-shar",
|
559
|
-
".shf" => "application/shf+xml",
|
560
|
-
".sig" => "application/pgp-signature",
|
561
|
-
".sit" => "application/x-stuffit",
|
562
|
-
".sitx" => "application/x-stuffitx",
|
563
|
-
".skp" => "application/vnd.koan",
|
564
|
-
".slt" => "application/vnd.epson.salt",
|
565
|
-
".smi" => "application/smil+xml",
|
566
|
-
".snd" => "audio/basic",
|
567
|
-
".so" => "application/octet-stream",
|
568
|
-
".spf" => "application/vnd.yamaha.smaf-phrase",
|
569
|
-
".spl" => "application/x-futuresplash",
|
570
|
-
".spot" => "text/vnd.in3d.spot",
|
571
|
-
".spp" => "application/scvp-vp-response",
|
572
|
-
".spq" => "application/scvp-vp-request",
|
573
|
-
".src" => "application/x-wais-source",
|
574
|
-
".srx" => "application/sparql-results+xml",
|
575
|
-
".sse" => "application/vnd.kodak-descriptor",
|
576
|
-
".ssf" => "application/vnd.epson.ssf",
|
577
|
-
".ssml" => "application/ssml+xml",
|
578
|
-
".stf" => "application/vnd.wt.stf",
|
579
|
-
".stk" => "application/hyperstudio",
|
580
|
-
".str" => "application/vnd.pg.format",
|
581
|
-
".sus" => "application/vnd.sus-calendar",
|
582
|
-
".sv4cpio" => "application/x-sv4cpio",
|
583
|
-
".sv4crc" => "application/x-sv4crc",
|
584
|
-
".svd" => "application/vnd.svd",
|
585
|
-
".svg" => "image/svg+xml",
|
586
|
-
".svgz" => "image/svg+xml",
|
587
|
-
".swf" => "application/x-shockwave-flash",
|
588
|
-
".swi" => "application/vnd.arastra.swi",
|
589
|
-
".t" => "text/troff",
|
590
|
-
".tao" => "application/vnd.tao.intent-module-archive",
|
591
|
-
".tar" => "application/x-tar",
|
592
|
-
".tbz" => "application/x-bzip-compressed-tar",
|
593
|
-
".tcap" => "application/vnd.3gpp2.tcap",
|
594
|
-
".tcl" => "application/x-tcl",
|
595
|
-
".tex" => "application/x-tex",
|
596
|
-
".texi" => "application/x-texinfo",
|
597
|
-
".texinfo" => "application/x-texinfo",
|
598
|
-
".text" => "text/plain",
|
599
|
-
".tif" => "image/tiff",
|
600
|
-
".tiff" => "image/tiff",
|
601
|
-
".tmo" => "application/vnd.tmobile-livetv",
|
602
|
-
".torrent" => "application/x-bittorrent",
|
603
|
-
".tpl" => "application/vnd.groove-tool-template",
|
604
|
-
".tpt" => "application/vnd.trid.tpt",
|
605
|
-
".tr" => "text/troff",
|
606
|
-
".tra" => "application/vnd.trueapp",
|
607
|
-
".trm" => "application/x-msterminal",
|
608
|
-
".tsv" => "text/tab-separated-values",
|
609
|
-
".ttf" => "application/octet-stream",
|
610
|
-
".twd" => "application/vnd.simtech-mindmapper",
|
611
|
-
".txd" => "application/vnd.genomatix.tuxedo",
|
612
|
-
".txf" => "application/vnd.mobius.txf",
|
613
|
-
".txt" => "text/plain",
|
614
|
-
".ufd" => "application/vnd.ufdl",
|
615
|
-
".umj" => "application/vnd.umajin",
|
616
|
-
".unityweb" => "application/vnd.unity",
|
617
|
-
".uoml" => "application/vnd.uoml+xml",
|
618
|
-
".uri" => "text/uri-list",
|
619
|
-
".ustar" => "application/x-ustar",
|
620
|
-
".utz" => "application/vnd.uiq.theme",
|
621
|
-
".uu" => "text/x-uuencode",
|
622
|
-
".vcd" => "application/x-cdlink",
|
623
|
-
".vcf" => "text/x-vcard",
|
624
|
-
".vcg" => "application/vnd.groove-vcard",
|
625
|
-
".vcs" => "text/x-vcalendar",
|
626
|
-
".vcx" => "application/vnd.vcx",
|
627
|
-
".vis" => "application/vnd.visionary",
|
628
|
-
".viv" => "video/vnd.vivo",
|
629
|
-
".vrml" => "model/vrml",
|
630
|
-
".vsd" => "application/vnd.visio",
|
631
|
-
".vsf" => "application/vnd.vsf",
|
632
|
-
".vtu" => "model/vnd.vtu",
|
633
|
-
".vxml" => "application/voicexml+xml",
|
634
|
-
".war" => "application/java-archive",
|
635
|
-
".wav" => "audio/x-wav",
|
636
|
-
".wax" => "audio/x-ms-wax",
|
637
|
-
".wbmp" => "image/vnd.wap.wbmp",
|
638
|
-
".wbs" => "application/vnd.criticaltools.wbs+xml",
|
639
|
-
".wbxml" => "application/vnd.wap.wbxml",
|
640
|
-
".webm" => "video/webm",
|
641
|
-
".wm" => "video/x-ms-wm",
|
642
|
-
".wma" => "audio/x-ms-wma",
|
643
|
-
".wmd" => "application/x-ms-wmd",
|
644
|
-
".wmf" => "application/x-msmetafile",
|
645
|
-
".wml" => "text/vnd.wap.wml",
|
646
|
-
".wmlc" => "application/vnd.wap.wmlc",
|
647
|
-
".wmls" => "text/vnd.wap.wmlscript",
|
648
|
-
".wmlsc" => "application/vnd.wap.wmlscriptc",
|
649
|
-
".wmv" => "video/x-ms-wmv",
|
650
|
-
".wmx" => "video/x-ms-wmx",
|
651
|
-
".wmz" => "application/x-ms-wmz",
|
652
|
-
".woff" => "application/font-woff",
|
653
|
-
".woff2" => "application/font-woff2",
|
654
|
-
".wpd" => "application/vnd.wordperfect",
|
655
|
-
".wpl" => "application/vnd.ms-wpl",
|
656
|
-
".wps" => "application/vnd.ms-works",
|
657
|
-
".wqd" => "application/vnd.wqd",
|
658
|
-
".wri" => "application/x-mswrite",
|
659
|
-
".wrl" => "model/vrml",
|
660
|
-
".wsdl" => "application/wsdl+xml",
|
661
|
-
".wspolicy" => "application/wspolicy+xml",
|
662
|
-
".wtb" => "application/vnd.webturbo",
|
663
|
-
".wvx" => "video/x-ms-wvx",
|
664
|
-
".x3d" => "application/vnd.hzn-3d-crossword",
|
665
|
-
".xar" => "application/vnd.xara",
|
666
|
-
".xbd" => "application/vnd.fujixerox.docuworks.binder",
|
667
|
-
".xbm" => "image/x-xbitmap",
|
668
|
-
".xdm" => "application/vnd.syncml.dm+xml",
|
669
|
-
".xdp" => "application/vnd.adobe.xdp+xml",
|
670
|
-
".xdw" => "application/vnd.fujixerox.docuworks",
|
671
|
-
".xenc" => "application/xenc+xml",
|
672
|
-
".xer" => "application/patch-ops-error+xml",
|
673
|
-
".xfdf" => "application/vnd.adobe.xfdf",
|
674
|
-
".xfdl" => "application/vnd.xfdl",
|
675
|
-
".xhtml" => "application/xhtml+xml",
|
676
|
-
".xif" => "image/vnd.xiff",
|
677
|
-
".xla" => "application/vnd.ms-excel",
|
678
|
-
".xlam" => "application/vnd.ms-excel.addin.macroEnabled.12",
|
679
|
-
".xls" => "application/vnd.ms-excel",
|
680
|
-
".xlsb" => "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
681
|
-
".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
682
|
-
".xlsm" => "application/vnd.ms-excel.sheet.macroEnabled.12",
|
683
|
-
".xlt" => "application/vnd.ms-excel",
|
684
|
-
".xltx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
|
685
|
-
".xml" => "application/xml",
|
686
|
-
".xo" => "application/vnd.olpc-sugar",
|
687
|
-
".xop" => "application/xop+xml",
|
688
|
-
".xpm" => "image/x-xpixmap",
|
689
|
-
".xpr" => "application/vnd.is-xpr",
|
690
|
-
".xps" => "application/vnd.ms-xpsdocument",
|
691
|
-
".xpw" => "application/vnd.intercon.formnet",
|
692
|
-
".xsl" => "application/xml",
|
693
|
-
".xslt" => "application/xslt+xml",
|
694
|
-
".xsm" => "application/vnd.syncml+xml",
|
695
|
-
".xspf" => "application/xspf+xml",
|
696
|
-
".xul" => "application/vnd.mozilla.xul+xml",
|
697
|
-
".xwd" => "image/x-xwindowdump",
|
698
|
-
".xyz" => "chemical/x-xyz",
|
699
|
-
".yaml" => "text/yaml",
|
700
|
-
".yml" => "text/yaml",
|
701
|
-
".zaz" => "application/vnd.zzazz.deck+xml",
|
702
|
-
".zip" => "application/zip",
|
703
|
-
".zmm" => "application/vnd.handheld-entertainment+xml",
|
704
|
-
}
|
705
|
-
|
706
|
-
end
|
707
|
-
end
|
1
|
+
module Waitress
|
2
|
+
# A small utility class responsible for determining Mime Types and Status responses
|
3
|
+
class Util
|
4
|
+
|
5
|
+
# Match a file extension to a valid Mime Type to be used in Content-Type
|
6
|
+
# headers
|
7
|
+
# +ext+:: The file extension to map
|
8
|
+
# +default+:: The default value to use if a match is not found. Defaults to
|
9
|
+
# application/octet-stream
|
10
|
+
def self.mime ext, default='application/octet-stream'
|
11
|
+
MIME_TYPES.fetch(ext.to_s.downcase, default)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Get the status message for a status code. This matches codes used by the
|
15
|
+
# HTTP protocol to their message, e.g. 200 -> OK, 404 -> Not Found, etc
|
16
|
+
# +code+:: The Status Code to match.
|
17
|
+
def self.status code
|
18
|
+
STATUS[code]
|
19
|
+
end
|
20
|
+
|
21
|
+
STATUS = {
|
22
|
+
100 => "Continue",
|
23
|
+
101 => "Switching Protocols",
|
24
|
+
102 => "Processing",
|
25
|
+
|
26
|
+
200 => "OK",
|
27
|
+
201 => "Created",
|
28
|
+
202 => "Accepted",
|
29
|
+
203 => "Non-Authoritative Information",
|
30
|
+
204 => "No Content",
|
31
|
+
205 => "Reset Content",
|
32
|
+
206 => "Partial Content",
|
33
|
+
207 => "Multi-Status",
|
34
|
+
208 => "Already Reported",
|
35
|
+
226 => "IM Used",
|
36
|
+
|
37
|
+
300 => "Multiple Choices",
|
38
|
+
301 => "Moved Permanently",
|
39
|
+
302 => "Found",
|
40
|
+
303 => "See Other",
|
41
|
+
304 => "Not Modified",
|
42
|
+
305 => "Use Proxy",
|
43
|
+
307 => "Temporary Redirect",
|
44
|
+
308 => "Permanent Redirect",
|
45
|
+
|
46
|
+
400 => "Bad Request",
|
47
|
+
401 => "Unauthorized",
|
48
|
+
403 => "Forbidden",
|
49
|
+
404 => "Not Found",
|
50
|
+
405 => "Method Not Allowed",
|
51
|
+
406 => "Not Acceptable",
|
52
|
+
407 => "Proxy Authentication Required",
|
53
|
+
408 => "Request Timeout",
|
54
|
+
409 => "Conflict",
|
55
|
+
410 => "Gone",
|
56
|
+
411 => "Length Required",
|
57
|
+
412 => "Precondition Failed",
|
58
|
+
413 => "Payload Too Large",
|
59
|
+
414 => "Request-URI Too Long",
|
60
|
+
415 => "Unsupported Media Type",
|
61
|
+
416 => "Requested Range Not Satifiable",
|
62
|
+
417 => "Expectation Failed",
|
63
|
+
418 => "I'm a teapot",
|
64
|
+
426 => "Update Required",
|
65
|
+
429 => "Too Many Requests",
|
66
|
+
|
67
|
+
500 => "Internal Server Error",
|
68
|
+
501 => "Not Implemented",
|
69
|
+
502 => "Bad Gateway",
|
70
|
+
503 => "Service Unavailable",
|
71
|
+
504 => "Gateway Timeout",
|
72
|
+
505 => "HTTP Version Not Supported",
|
73
|
+
520 => "Unknown Error"
|
74
|
+
}
|
75
|
+
|
76
|
+
# Taken from Rack::Mime
|
77
|
+
MIME_TYPES = {
|
78
|
+
".123" => "application/vnd.lotus-1-2-3",
|
79
|
+
".3dml" => "text/vnd.in3d.3dml",
|
80
|
+
".3g2" => "video/3gpp2",
|
81
|
+
".3gp" => "video/3gpp",
|
82
|
+
".a" => "application/octet-stream",
|
83
|
+
".acc" => "application/vnd.americandynamics.acc",
|
84
|
+
".ace" => "application/x-ace-compressed",
|
85
|
+
".acu" => "application/vnd.acucobol",
|
86
|
+
".aep" => "application/vnd.audiograph",
|
87
|
+
".afp" => "application/vnd.ibm.modcap",
|
88
|
+
".ai" => "application/postscript",
|
89
|
+
".aif" => "audio/x-aiff",
|
90
|
+
".aiff" => "audio/x-aiff",
|
91
|
+
".ami" => "application/vnd.amiga.ami",
|
92
|
+
".appcache" => "text/cache-manifest",
|
93
|
+
".apr" => "application/vnd.lotus-approach",
|
94
|
+
".asc" => "application/pgp-signature",
|
95
|
+
".asf" => "video/x-ms-asf",
|
96
|
+
".asm" => "text/x-asm",
|
97
|
+
".aso" => "application/vnd.accpac.simply.aso",
|
98
|
+
".asx" => "video/x-ms-asf",
|
99
|
+
".atc" => "application/vnd.acucorp",
|
100
|
+
".atom" => "application/atom+xml",
|
101
|
+
".atomcat" => "application/atomcat+xml",
|
102
|
+
".atomsvc" => "application/atomsvc+xml",
|
103
|
+
".atx" => "application/vnd.antix.game-component",
|
104
|
+
".au" => "audio/basic",
|
105
|
+
".avi" => "video/x-msvideo",
|
106
|
+
".bat" => "application/x-msdownload",
|
107
|
+
".bcpio" => "application/x-bcpio",
|
108
|
+
".bdm" => "application/vnd.syncml.dm+wbxml",
|
109
|
+
".bh2" => "application/vnd.fujitsu.oasysprs",
|
110
|
+
".bin" => "application/octet-stream",
|
111
|
+
".bmi" => "application/vnd.bmi",
|
112
|
+
".bmp" => "image/bmp",
|
113
|
+
".box" => "application/vnd.previewsystems.box",
|
114
|
+
".btif" => "image/prs.btif",
|
115
|
+
".bz" => "application/x-bzip",
|
116
|
+
".bz2" => "application/x-bzip2",
|
117
|
+
".c" => "text/x-c",
|
118
|
+
".c4g" => "application/vnd.clonk.c4group",
|
119
|
+
".cab" => "application/vnd.ms-cab-compressed",
|
120
|
+
".cc" => "text/x-c",
|
121
|
+
".ccxml" => "application/ccxml+xml",
|
122
|
+
".cdbcmsg" => "application/vnd.contact.cmsg",
|
123
|
+
".cdkey" => "application/vnd.mediastation.cdkey",
|
124
|
+
".cdx" => "chemical/x-cdx",
|
125
|
+
".cdxml" => "application/vnd.chemdraw+xml",
|
126
|
+
".cdy" => "application/vnd.cinderella",
|
127
|
+
".cer" => "application/pkix-cert",
|
128
|
+
".cgm" => "image/cgm",
|
129
|
+
".chat" => "application/x-chat",
|
130
|
+
".chm" => "application/vnd.ms-htmlhelp",
|
131
|
+
".chrt" => "application/vnd.kde.kchart",
|
132
|
+
".cif" => "chemical/x-cif",
|
133
|
+
".cii" => "application/vnd.anser-web-certificate-issue-initiation",
|
134
|
+
".cil" => "application/vnd.ms-artgalry",
|
135
|
+
".cla" => "application/vnd.claymore",
|
136
|
+
".class" => "application/octet-stream",
|
137
|
+
".clkk" => "application/vnd.crick.clicker.keyboard",
|
138
|
+
".clkp" => "application/vnd.crick.clicker.palette",
|
139
|
+
".clkt" => "application/vnd.crick.clicker.template",
|
140
|
+
".clkw" => "application/vnd.crick.clicker.wordbank",
|
141
|
+
".clkx" => "application/vnd.crick.clicker",
|
142
|
+
".clp" => "application/x-msclip",
|
143
|
+
".cmc" => "application/vnd.cosmocaller",
|
144
|
+
".cmdf" => "chemical/x-cmdf",
|
145
|
+
".cml" => "chemical/x-cml",
|
146
|
+
".cmp" => "application/vnd.yellowriver-custom-menu",
|
147
|
+
".cmx" => "image/x-cmx",
|
148
|
+
".com" => "application/x-msdownload",
|
149
|
+
".conf" => "text/plain",
|
150
|
+
".cpio" => "application/x-cpio",
|
151
|
+
".cpp" => "text/x-c",
|
152
|
+
".cpt" => "application/mac-compactpro",
|
153
|
+
".crd" => "application/x-mscardfile",
|
154
|
+
".crl" => "application/pkix-crl",
|
155
|
+
".crt" => "application/x-x509-ca-cert",
|
156
|
+
".csh" => "application/x-csh",
|
157
|
+
".csml" => "chemical/x-csml",
|
158
|
+
".csp" => "application/vnd.commonspace",
|
159
|
+
".css" => "text/css",
|
160
|
+
".csv" => "text/csv",
|
161
|
+
".curl" => "application/vnd.curl",
|
162
|
+
".cww" => "application/prs.cww",
|
163
|
+
".cxx" => "text/x-c",
|
164
|
+
".daf" => "application/vnd.mobius.daf",
|
165
|
+
".davmount" => "application/davmount+xml",
|
166
|
+
".dcr" => "application/x-director",
|
167
|
+
".dd2" => "application/vnd.oma.dd2+xml",
|
168
|
+
".ddd" => "application/vnd.fujixerox.ddd",
|
169
|
+
".deb" => "application/x-debian-package",
|
170
|
+
".der" => "application/x-x509-ca-cert",
|
171
|
+
".dfac" => "application/vnd.dreamfactory",
|
172
|
+
".diff" => "text/x-diff",
|
173
|
+
".dis" => "application/vnd.mobius.dis",
|
174
|
+
".djv" => "image/vnd.djvu",
|
175
|
+
".djvu" => "image/vnd.djvu",
|
176
|
+
".dll" => "application/x-msdownload",
|
177
|
+
".dmg" => "application/octet-stream",
|
178
|
+
".dna" => "application/vnd.dna",
|
179
|
+
".doc" => "application/msword",
|
180
|
+
".docm" => "application/vnd.ms-word.document.macroEnabled.12",
|
181
|
+
".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
182
|
+
".dot" => "application/msword",
|
183
|
+
".dotm" => "application/vnd.ms-word.template.macroEnabled.12",
|
184
|
+
".dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
|
185
|
+
".dp" => "application/vnd.osgi.dp",
|
186
|
+
".dpg" => "application/vnd.dpgraph",
|
187
|
+
".dsc" => "text/prs.lines.tag",
|
188
|
+
".dtd" => "application/xml-dtd",
|
189
|
+
".dts" => "audio/vnd.dts",
|
190
|
+
".dtshd" => "audio/vnd.dts.hd",
|
191
|
+
".dv" => "video/x-dv",
|
192
|
+
".dvi" => "application/x-dvi",
|
193
|
+
".dwf" => "model/vnd.dwf",
|
194
|
+
".dwg" => "image/vnd.dwg",
|
195
|
+
".dxf" => "image/vnd.dxf",
|
196
|
+
".dxp" => "application/vnd.spotfire.dxp",
|
197
|
+
".ear" => "application/java-archive",
|
198
|
+
".ecelp4800" => "audio/vnd.nuera.ecelp4800",
|
199
|
+
".ecelp7470" => "audio/vnd.nuera.ecelp7470",
|
200
|
+
".ecelp9600" => "audio/vnd.nuera.ecelp9600",
|
201
|
+
".ecma" => "application/ecmascript",
|
202
|
+
".edm" => "application/vnd.novadigm.edm",
|
203
|
+
".edx" => "application/vnd.novadigm.edx",
|
204
|
+
".efif" => "application/vnd.picsel",
|
205
|
+
".ei6" => "application/vnd.pg.osasli",
|
206
|
+
".eml" => "message/rfc822",
|
207
|
+
".eol" => "audio/vnd.digital-winds",
|
208
|
+
".eot" => "application/vnd.ms-fontobject",
|
209
|
+
".eps" => "application/postscript",
|
210
|
+
".es3" => "application/vnd.eszigno3+xml",
|
211
|
+
".esf" => "application/vnd.epson.esf",
|
212
|
+
".etx" => "text/x-setext",
|
213
|
+
".exe" => "application/x-msdownload",
|
214
|
+
".ext" => "application/vnd.novadigm.ext",
|
215
|
+
".ez" => "application/andrew-inset",
|
216
|
+
".ez2" => "application/vnd.ezpix-album",
|
217
|
+
".ez3" => "application/vnd.ezpix-package",
|
218
|
+
".f" => "text/x-fortran",
|
219
|
+
".f77" => "text/x-fortran",
|
220
|
+
".f90" => "text/x-fortran",
|
221
|
+
".fbs" => "image/vnd.fastbidsheet",
|
222
|
+
".fdf" => "application/vnd.fdf",
|
223
|
+
".fe_launch" => "application/vnd.denovo.fcselayout-link",
|
224
|
+
".fg5" => "application/vnd.fujitsu.oasysgp",
|
225
|
+
".fli" => "video/x-fli",
|
226
|
+
".flo" => "application/vnd.micrografx.flo",
|
227
|
+
".flv" => "video/x-flv",
|
228
|
+
".flw" => "application/vnd.kde.kivio",
|
229
|
+
".flx" => "text/vnd.fmi.flexstor",
|
230
|
+
".fly" => "text/vnd.fly",
|
231
|
+
".fm" => "application/vnd.framemaker",
|
232
|
+
".fnc" => "application/vnd.frogans.fnc",
|
233
|
+
".for" => "text/x-fortran",
|
234
|
+
".fpx" => "image/vnd.fpx",
|
235
|
+
".fsc" => "application/vnd.fsc.weblaunch",
|
236
|
+
".fst" => "image/vnd.fst",
|
237
|
+
".ftc" => "application/vnd.fluxtime.clip",
|
238
|
+
".fti" => "application/vnd.anser-web-funds-transfer-initiation",
|
239
|
+
".fvt" => "video/vnd.fvt",
|
240
|
+
".fzs" => "application/vnd.fuzzysheet",
|
241
|
+
".g3" => "image/g3fax",
|
242
|
+
".gac" => "application/vnd.groove-account",
|
243
|
+
".gdl" => "model/vnd.gdl",
|
244
|
+
".gem" => "application/octet-stream",
|
245
|
+
".gemspec" => "text/x-script.ruby",
|
246
|
+
".ghf" => "application/vnd.groove-help",
|
247
|
+
".gif" => "image/gif",
|
248
|
+
".gim" => "application/vnd.groove-identity-message",
|
249
|
+
".gmx" => "application/vnd.gmx",
|
250
|
+
".gph" => "application/vnd.flographit",
|
251
|
+
".gqf" => "application/vnd.grafeq",
|
252
|
+
".gram" => "application/srgs",
|
253
|
+
".grv" => "application/vnd.groove-injector",
|
254
|
+
".grxml" => "application/srgs+xml",
|
255
|
+
".gtar" => "application/x-gtar",
|
256
|
+
".gtm" => "application/vnd.groove-tool-message",
|
257
|
+
".gtw" => "model/vnd.gtw",
|
258
|
+
".gv" => "text/vnd.graphviz",
|
259
|
+
".gz" => "application/x-gzip",
|
260
|
+
".h" => "text/x-c",
|
261
|
+
".h261" => "video/h261",
|
262
|
+
".h263" => "video/h263",
|
263
|
+
".h264" => "video/h264",
|
264
|
+
".hbci" => "application/vnd.hbci",
|
265
|
+
".hdf" => "application/x-hdf",
|
266
|
+
".hh" => "text/x-c",
|
267
|
+
".hlp" => "application/winhlp",
|
268
|
+
".hpgl" => "application/vnd.hp-hpgl",
|
269
|
+
".hpid" => "application/vnd.hp-hpid",
|
270
|
+
".hps" => "application/vnd.hp-hps",
|
271
|
+
".hqx" => "application/mac-binhex40",
|
272
|
+
".htc" => "text/x-component",
|
273
|
+
".htke" => "application/vnd.kenameaapp",
|
274
|
+
".htm" => "text/html",
|
275
|
+
".html" => "text/html",
|
276
|
+
".hvd" => "application/vnd.yamaha.hv-dic",
|
277
|
+
".hvp" => "application/vnd.yamaha.hv-voice",
|
278
|
+
".hvs" => "application/vnd.yamaha.hv-script",
|
279
|
+
".icc" => "application/vnd.iccprofile",
|
280
|
+
".ice" => "x-conference/x-cooltalk",
|
281
|
+
".ico" => "image/vnd.microsoft.icon",
|
282
|
+
".ics" => "text/calendar",
|
283
|
+
".ief" => "image/ief",
|
284
|
+
".ifb" => "text/calendar",
|
285
|
+
".ifm" => "application/vnd.shana.informed.formdata",
|
286
|
+
".igl" => "application/vnd.igloader",
|
287
|
+
".igs" => "model/iges",
|
288
|
+
".igx" => "application/vnd.micrografx.igx",
|
289
|
+
".iif" => "application/vnd.shana.informed.interchange",
|
290
|
+
".imp" => "application/vnd.accpac.simply.imp",
|
291
|
+
".ims" => "application/vnd.ms-ims",
|
292
|
+
".ipk" => "application/vnd.shana.informed.package",
|
293
|
+
".irm" => "application/vnd.ibm.rights-management",
|
294
|
+
".irp" => "application/vnd.irepository.package+xml",
|
295
|
+
".iso" => "application/octet-stream",
|
296
|
+
".itp" => "application/vnd.shana.informed.formtemplate",
|
297
|
+
".ivp" => "application/vnd.immervision-ivp",
|
298
|
+
".ivu" => "application/vnd.immervision-ivu",
|
299
|
+
".jad" => "text/vnd.sun.j2me.app-descriptor",
|
300
|
+
".jam" => "application/vnd.jam",
|
301
|
+
".jar" => "application/java-archive",
|
302
|
+
".java" => "text/x-java-source",
|
303
|
+
".jisp" => "application/vnd.jisp",
|
304
|
+
".jlt" => "application/vnd.hp-jlyt",
|
305
|
+
".jnlp" => "application/x-java-jnlp-file",
|
306
|
+
".joda" => "application/vnd.joost.joda-archive",
|
307
|
+
".jp2" => "image/jp2",
|
308
|
+
".jpeg" => "image/jpeg",
|
309
|
+
".jpg" => "image/jpeg",
|
310
|
+
".jpgv" => "video/jpeg",
|
311
|
+
".jpm" => "video/jpm",
|
312
|
+
".js" => "application/javascript",
|
313
|
+
".json" => "application/json",
|
314
|
+
".karbon" => "application/vnd.kde.karbon",
|
315
|
+
".kfo" => "application/vnd.kde.kformula",
|
316
|
+
".kia" => "application/vnd.kidspiration",
|
317
|
+
".kml" => "application/vnd.google-earth.kml+xml",
|
318
|
+
".kmz" => "application/vnd.google-earth.kmz",
|
319
|
+
".kne" => "application/vnd.kinar",
|
320
|
+
".kon" => "application/vnd.kde.kontour",
|
321
|
+
".kpr" => "application/vnd.kde.kpresenter",
|
322
|
+
".ksp" => "application/vnd.kde.kspread",
|
323
|
+
".ktz" => "application/vnd.kahootz",
|
324
|
+
".kwd" => "application/vnd.kde.kword",
|
325
|
+
".latex" => "application/x-latex",
|
326
|
+
".lbd" => "application/vnd.llamagraphics.life-balance.desktop",
|
327
|
+
".lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
|
328
|
+
".les" => "application/vnd.hhe.lesson-player",
|
329
|
+
".link66" => "application/vnd.route66.link66+xml",
|
330
|
+
".log" => "text/plain",
|
331
|
+
".lostxml" => "application/lost+xml",
|
332
|
+
".lrm" => "application/vnd.ms-lrm",
|
333
|
+
".ltf" => "application/vnd.frogans.ltf",
|
334
|
+
".lvp" => "audio/vnd.lucent.voice",
|
335
|
+
".lwp" => "application/vnd.lotus-wordpro",
|
336
|
+
".m3u" => "audio/x-mpegurl",
|
337
|
+
".m4a" => "audio/mp4a-latm",
|
338
|
+
".m4v" => "video/mp4",
|
339
|
+
".ma" => "application/mathematica",
|
340
|
+
".mag" => "application/vnd.ecowin.chart",
|
341
|
+
".man" => "text/troff",
|
342
|
+
".manifest" => "text/cache-manifest",
|
343
|
+
".mathml" => "application/mathml+xml",
|
344
|
+
".mbk" => "application/vnd.mobius.mbk",
|
345
|
+
".mbox" => "application/mbox",
|
346
|
+
".mc1" => "application/vnd.medcalcdata",
|
347
|
+
".mcd" => "application/vnd.mcd",
|
348
|
+
".mdb" => "application/x-msaccess",
|
349
|
+
".mdi" => "image/vnd.ms-modi",
|
350
|
+
".mdoc" => "text/troff",
|
351
|
+
".me" => "text/troff",
|
352
|
+
".mfm" => "application/vnd.mfmp",
|
353
|
+
".mgz" => "application/vnd.proteus.magazine",
|
354
|
+
".mid" => "audio/midi",
|
355
|
+
".midi" => "audio/midi",
|
356
|
+
".mif" => "application/vnd.mif",
|
357
|
+
".mime" => "message/rfc822",
|
358
|
+
".mj2" => "video/mj2",
|
359
|
+
".mlp" => "application/vnd.dolby.mlp",
|
360
|
+
".mmd" => "application/vnd.chipnuts.karaoke-mmd",
|
361
|
+
".mmf" => "application/vnd.smaf",
|
362
|
+
".mml" => "application/mathml+xml",
|
363
|
+
".mmr" => "image/vnd.fujixerox.edmics-mmr",
|
364
|
+
".mng" => "video/x-mng",
|
365
|
+
".mny" => "application/x-msmoney",
|
366
|
+
".mov" => "video/quicktime",
|
367
|
+
".movie" => "video/x-sgi-movie",
|
368
|
+
".mp3" => "audio/mpeg",
|
369
|
+
".mp4" => "video/mp4",
|
370
|
+
".mp4a" => "audio/mp4",
|
371
|
+
".mp4s" => "application/mp4",
|
372
|
+
".mp4v" => "video/mp4",
|
373
|
+
".mpc" => "application/vnd.mophun.certificate",
|
374
|
+
".mpeg" => "video/mpeg",
|
375
|
+
".mpg" => "video/mpeg",
|
376
|
+
".mpga" => "audio/mpeg",
|
377
|
+
".mpkg" => "application/vnd.apple.installer+xml",
|
378
|
+
".mpm" => "application/vnd.blueice.multipass",
|
379
|
+
".mpn" => "application/vnd.mophun.application",
|
380
|
+
".mpp" => "application/vnd.ms-project",
|
381
|
+
".mpy" => "application/vnd.ibm.minipay",
|
382
|
+
".mqy" => "application/vnd.mobius.mqy",
|
383
|
+
".mrc" => "application/marc",
|
384
|
+
".ms" => "text/troff",
|
385
|
+
".mscml" => "application/mediaservercontrol+xml",
|
386
|
+
".mseq" => "application/vnd.mseq",
|
387
|
+
".msf" => "application/vnd.epson.msf",
|
388
|
+
".msh" => "model/mesh",
|
389
|
+
".msi" => "application/x-msdownload",
|
390
|
+
".msl" => "application/vnd.mobius.msl",
|
391
|
+
".msty" => "application/vnd.muvee.style",
|
392
|
+
".mts" => "model/vnd.mts",
|
393
|
+
".mus" => "application/vnd.musician",
|
394
|
+
".mvb" => "application/x-msmediaview",
|
395
|
+
".mwf" => "application/vnd.mfer",
|
396
|
+
".mxf" => "application/mxf",
|
397
|
+
".mxl" => "application/vnd.recordare.musicxml",
|
398
|
+
".mxml" => "application/xv+xml",
|
399
|
+
".mxs" => "application/vnd.triscape.mxs",
|
400
|
+
".mxu" => "video/vnd.mpegurl",
|
401
|
+
".n" => "application/vnd.nokia.n-gage.symbian.install",
|
402
|
+
".nc" => "application/x-netcdf",
|
403
|
+
".ngdat" => "application/vnd.nokia.n-gage.data",
|
404
|
+
".nlu" => "application/vnd.neurolanguage.nlu",
|
405
|
+
".nml" => "application/vnd.enliven",
|
406
|
+
".nnd" => "application/vnd.noblenet-directory",
|
407
|
+
".nns" => "application/vnd.noblenet-sealer",
|
408
|
+
".nnw" => "application/vnd.noblenet-web",
|
409
|
+
".npx" => "image/vnd.net-fpx",
|
410
|
+
".nsf" => "application/vnd.lotus-notes",
|
411
|
+
".oa2" => "application/vnd.fujitsu.oasys2",
|
412
|
+
".oa3" => "application/vnd.fujitsu.oasys3",
|
413
|
+
".oas" => "application/vnd.fujitsu.oasys",
|
414
|
+
".obd" => "application/x-msbinder",
|
415
|
+
".oda" => "application/oda",
|
416
|
+
".odc" => "application/vnd.oasis.opendocument.chart",
|
417
|
+
".odf" => "application/vnd.oasis.opendocument.formula",
|
418
|
+
".odg" => "application/vnd.oasis.opendocument.graphics",
|
419
|
+
".odi" => "application/vnd.oasis.opendocument.image",
|
420
|
+
".odp" => "application/vnd.oasis.opendocument.presentation",
|
421
|
+
".ods" => "application/vnd.oasis.opendocument.spreadsheet",
|
422
|
+
".odt" => "application/vnd.oasis.opendocument.text",
|
423
|
+
".oga" => "audio/ogg",
|
424
|
+
".ogg" => "application/ogg",
|
425
|
+
".ogv" => "video/ogg",
|
426
|
+
".ogx" => "application/ogg",
|
427
|
+
".org" => "application/vnd.lotus-organizer",
|
428
|
+
".otc" => "application/vnd.oasis.opendocument.chart-template",
|
429
|
+
".otf" => "application/vnd.oasis.opendocument.formula-template",
|
430
|
+
".otg" => "application/vnd.oasis.opendocument.graphics-template",
|
431
|
+
".oth" => "application/vnd.oasis.opendocument.text-web",
|
432
|
+
".oti" => "application/vnd.oasis.opendocument.image-template",
|
433
|
+
".otm" => "application/vnd.oasis.opendocument.text-master",
|
434
|
+
".ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
|
435
|
+
".ott" => "application/vnd.oasis.opendocument.text-template",
|
436
|
+
".oxt" => "application/vnd.openofficeorg.extension",
|
437
|
+
".p" => "text/x-pascal",
|
438
|
+
".p10" => "application/pkcs10",
|
439
|
+
".p12" => "application/x-pkcs12",
|
440
|
+
".p7b" => "application/x-pkcs7-certificates",
|
441
|
+
".p7m" => "application/pkcs7-mime",
|
442
|
+
".p7r" => "application/x-pkcs7-certreqresp",
|
443
|
+
".p7s" => "application/pkcs7-signature",
|
444
|
+
".pas" => "text/x-pascal",
|
445
|
+
".pbd" => "application/vnd.powerbuilder6",
|
446
|
+
".pbm" => "image/x-portable-bitmap",
|
447
|
+
".pcl" => "application/vnd.hp-pcl",
|
448
|
+
".pclxl" => "application/vnd.hp-pclxl",
|
449
|
+
".pcx" => "image/x-pcx",
|
450
|
+
".pdb" => "chemical/x-pdb",
|
451
|
+
".pdf" => "application/pdf",
|
452
|
+
".pem" => "application/x-x509-ca-cert",
|
453
|
+
".pfr" => "application/font-tdpfr",
|
454
|
+
".pgm" => "image/x-portable-graymap",
|
455
|
+
".pgn" => "application/x-chess-pgn",
|
456
|
+
".pgp" => "application/pgp-encrypted",
|
457
|
+
".pic" => "image/x-pict",
|
458
|
+
".pict" => "image/pict",
|
459
|
+
".pkg" => "application/octet-stream",
|
460
|
+
".pki" => "application/pkixcmp",
|
461
|
+
".pkipath" => "application/pkix-pkipath",
|
462
|
+
".pl" => "text/x-script.perl",
|
463
|
+
".plb" => "application/vnd.3gpp.pic-bw-large",
|
464
|
+
".plc" => "application/vnd.mobius.plc",
|
465
|
+
".plf" => "application/vnd.pocketlearn",
|
466
|
+
".pls" => "application/pls+xml",
|
467
|
+
".pm" => "text/x-script.perl-module",
|
468
|
+
".pml" => "application/vnd.ctc-posml",
|
469
|
+
".png" => "image/png",
|
470
|
+
".pnm" => "image/x-portable-anymap",
|
471
|
+
".pntg" => "image/x-macpaint",
|
472
|
+
".portpkg" => "application/vnd.macports.portpkg",
|
473
|
+
".pot" => "application/vnd.ms-powerpoint",
|
474
|
+
".potm" => "application/vnd.ms-powerpoint.template.macroEnabled.12",
|
475
|
+
".potx" => "application/vnd.openxmlformats-officedocument.presentationml.template",
|
476
|
+
".ppa" => "application/vnd.ms-powerpoint",
|
477
|
+
".ppam" => "application/vnd.ms-powerpoint.addin.macroEnabled.12",
|
478
|
+
".ppd" => "application/vnd.cups-ppd",
|
479
|
+
".ppm" => "image/x-portable-pixmap",
|
480
|
+
".pps" => "application/vnd.ms-powerpoint",
|
481
|
+
".ppsm" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
|
482
|
+
".ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
483
|
+
".ppt" => "application/vnd.ms-powerpoint",
|
484
|
+
".pptm" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
485
|
+
".pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
486
|
+
".prc" => "application/vnd.palm",
|
487
|
+
".pre" => "application/vnd.lotus-freelance",
|
488
|
+
".prf" => "application/pics-rules",
|
489
|
+
".ps" => "application/postscript",
|
490
|
+
".psb" => "application/vnd.3gpp.pic-bw-small",
|
491
|
+
".psd" => "image/vnd.adobe.photoshop",
|
492
|
+
".ptid" => "application/vnd.pvi.ptid1",
|
493
|
+
".pub" => "application/x-mspublisher",
|
494
|
+
".pvb" => "application/vnd.3gpp.pic-bw-var",
|
495
|
+
".pwn" => "application/vnd.3m.post-it-notes",
|
496
|
+
".py" => "text/x-script.python",
|
497
|
+
".pya" => "audio/vnd.ms-playready.media.pya",
|
498
|
+
".pyv" => "video/vnd.ms-playready.media.pyv",
|
499
|
+
".qam" => "application/vnd.epson.quickanime",
|
500
|
+
".qbo" => "application/vnd.intu.qbo",
|
501
|
+
".qfx" => "application/vnd.intu.qfx",
|
502
|
+
".qps" => "application/vnd.publishare-delta-tree",
|
503
|
+
".qt" => "video/quicktime",
|
504
|
+
".qtif" => "image/x-quicktime",
|
505
|
+
".qxd" => "application/vnd.quark.quarkxpress",
|
506
|
+
".ra" => "audio/x-pn-realaudio",
|
507
|
+
".rake" => "text/x-script.ruby",
|
508
|
+
".ram" => "audio/x-pn-realaudio",
|
509
|
+
".rar" => "application/x-rar-compressed",
|
510
|
+
".ras" => "image/x-cmu-raster",
|
511
|
+
".rb" => "text/x-script.ruby",
|
512
|
+
".rcprofile" => "application/vnd.ipunplugged.rcprofile",
|
513
|
+
".rdf" => "application/rdf+xml",
|
514
|
+
".rdz" => "application/vnd.data-vision.rdz",
|
515
|
+
".rep" => "application/vnd.businessobjects",
|
516
|
+
".rgb" => "image/x-rgb",
|
517
|
+
".rif" => "application/reginfo+xml",
|
518
|
+
".rl" => "application/resource-lists+xml",
|
519
|
+
".rlc" => "image/vnd.fujixerox.edmics-rlc",
|
520
|
+
".rld" => "application/resource-lists-diff+xml",
|
521
|
+
".rm" => "application/vnd.rn-realmedia",
|
522
|
+
".rmp" => "audio/x-pn-realaudio-plugin",
|
523
|
+
".rms" => "application/vnd.jcp.javame.midlet-rms",
|
524
|
+
".rnc" => "application/relax-ng-compact-syntax",
|
525
|
+
".roff" => "text/troff",
|
526
|
+
".rpm" => "application/x-redhat-package-manager",
|
527
|
+
".rpss" => "application/vnd.nokia.radio-presets",
|
528
|
+
".rpst" => "application/vnd.nokia.radio-preset",
|
529
|
+
".rq" => "application/sparql-query",
|
530
|
+
".rs" => "application/rls-services+xml",
|
531
|
+
".rsd" => "application/rsd+xml",
|
532
|
+
".rss" => "application/rss+xml",
|
533
|
+
".rtf" => "application/rtf",
|
534
|
+
".rtx" => "text/richtext",
|
535
|
+
".ru" => "text/x-script.ruby",
|
536
|
+
".s" => "text/x-asm",
|
537
|
+
".saf" => "application/vnd.yamaha.smaf-audio",
|
538
|
+
".sbml" => "application/sbml+xml",
|
539
|
+
".sc" => "application/vnd.ibm.secure-container",
|
540
|
+
".scd" => "application/x-msschedule",
|
541
|
+
".scm" => "application/vnd.lotus-screencam",
|
542
|
+
".scon" => "application/scon",
|
543
|
+
".scq" => "application/scvp-cv-request",
|
544
|
+
".scs" => "application/scvp-cv-response",
|
545
|
+
".sdkm" => "application/vnd.solent.sdkm+xml",
|
546
|
+
".sdp" => "application/sdp",
|
547
|
+
".see" => "application/vnd.seemail",
|
548
|
+
".sema" => "application/vnd.sema",
|
549
|
+
".semd" => "application/vnd.semd",
|
550
|
+
".semf" => "application/vnd.semf",
|
551
|
+
".setpay" => "application/set-payment-initiation",
|
552
|
+
".setreg" => "application/set-registration-initiation",
|
553
|
+
".sfd" => "application/vnd.hydrostatix.sof-data",
|
554
|
+
".sfs" => "application/vnd.spotfire.sfs",
|
555
|
+
".sgm" => "text/sgml",
|
556
|
+
".sgml" => "text/sgml",
|
557
|
+
".sh" => "application/x-sh",
|
558
|
+
".shar" => "application/x-shar",
|
559
|
+
".shf" => "application/shf+xml",
|
560
|
+
".sig" => "application/pgp-signature",
|
561
|
+
".sit" => "application/x-stuffit",
|
562
|
+
".sitx" => "application/x-stuffitx",
|
563
|
+
".skp" => "application/vnd.koan",
|
564
|
+
".slt" => "application/vnd.epson.salt",
|
565
|
+
".smi" => "application/smil+xml",
|
566
|
+
".snd" => "audio/basic",
|
567
|
+
".so" => "application/octet-stream",
|
568
|
+
".spf" => "application/vnd.yamaha.smaf-phrase",
|
569
|
+
".spl" => "application/x-futuresplash",
|
570
|
+
".spot" => "text/vnd.in3d.spot",
|
571
|
+
".spp" => "application/scvp-vp-response",
|
572
|
+
".spq" => "application/scvp-vp-request",
|
573
|
+
".src" => "application/x-wais-source",
|
574
|
+
".srx" => "application/sparql-results+xml",
|
575
|
+
".sse" => "application/vnd.kodak-descriptor",
|
576
|
+
".ssf" => "application/vnd.epson.ssf",
|
577
|
+
".ssml" => "application/ssml+xml",
|
578
|
+
".stf" => "application/vnd.wt.stf",
|
579
|
+
".stk" => "application/hyperstudio",
|
580
|
+
".str" => "application/vnd.pg.format",
|
581
|
+
".sus" => "application/vnd.sus-calendar",
|
582
|
+
".sv4cpio" => "application/x-sv4cpio",
|
583
|
+
".sv4crc" => "application/x-sv4crc",
|
584
|
+
".svd" => "application/vnd.svd",
|
585
|
+
".svg" => "image/svg+xml",
|
586
|
+
".svgz" => "image/svg+xml",
|
587
|
+
".swf" => "application/x-shockwave-flash",
|
588
|
+
".swi" => "application/vnd.arastra.swi",
|
589
|
+
".t" => "text/troff",
|
590
|
+
".tao" => "application/vnd.tao.intent-module-archive",
|
591
|
+
".tar" => "application/x-tar",
|
592
|
+
".tbz" => "application/x-bzip-compressed-tar",
|
593
|
+
".tcap" => "application/vnd.3gpp2.tcap",
|
594
|
+
".tcl" => "application/x-tcl",
|
595
|
+
".tex" => "application/x-tex",
|
596
|
+
".texi" => "application/x-texinfo",
|
597
|
+
".texinfo" => "application/x-texinfo",
|
598
|
+
".text" => "text/plain",
|
599
|
+
".tif" => "image/tiff",
|
600
|
+
".tiff" => "image/tiff",
|
601
|
+
".tmo" => "application/vnd.tmobile-livetv",
|
602
|
+
".torrent" => "application/x-bittorrent",
|
603
|
+
".tpl" => "application/vnd.groove-tool-template",
|
604
|
+
".tpt" => "application/vnd.trid.tpt",
|
605
|
+
".tr" => "text/troff",
|
606
|
+
".tra" => "application/vnd.trueapp",
|
607
|
+
".trm" => "application/x-msterminal",
|
608
|
+
".tsv" => "text/tab-separated-values",
|
609
|
+
".ttf" => "application/octet-stream",
|
610
|
+
".twd" => "application/vnd.simtech-mindmapper",
|
611
|
+
".txd" => "application/vnd.genomatix.tuxedo",
|
612
|
+
".txf" => "application/vnd.mobius.txf",
|
613
|
+
".txt" => "text/plain",
|
614
|
+
".ufd" => "application/vnd.ufdl",
|
615
|
+
".umj" => "application/vnd.umajin",
|
616
|
+
".unityweb" => "application/vnd.unity",
|
617
|
+
".uoml" => "application/vnd.uoml+xml",
|
618
|
+
".uri" => "text/uri-list",
|
619
|
+
".ustar" => "application/x-ustar",
|
620
|
+
".utz" => "application/vnd.uiq.theme",
|
621
|
+
".uu" => "text/x-uuencode",
|
622
|
+
".vcd" => "application/x-cdlink",
|
623
|
+
".vcf" => "text/x-vcard",
|
624
|
+
".vcg" => "application/vnd.groove-vcard",
|
625
|
+
".vcs" => "text/x-vcalendar",
|
626
|
+
".vcx" => "application/vnd.vcx",
|
627
|
+
".vis" => "application/vnd.visionary",
|
628
|
+
".viv" => "video/vnd.vivo",
|
629
|
+
".vrml" => "model/vrml",
|
630
|
+
".vsd" => "application/vnd.visio",
|
631
|
+
".vsf" => "application/vnd.vsf",
|
632
|
+
".vtu" => "model/vnd.vtu",
|
633
|
+
".vxml" => "application/voicexml+xml",
|
634
|
+
".war" => "application/java-archive",
|
635
|
+
".wav" => "audio/x-wav",
|
636
|
+
".wax" => "audio/x-ms-wax",
|
637
|
+
".wbmp" => "image/vnd.wap.wbmp",
|
638
|
+
".wbs" => "application/vnd.criticaltools.wbs+xml",
|
639
|
+
".wbxml" => "application/vnd.wap.wbxml",
|
640
|
+
".webm" => "video/webm",
|
641
|
+
".wm" => "video/x-ms-wm",
|
642
|
+
".wma" => "audio/x-ms-wma",
|
643
|
+
".wmd" => "application/x-ms-wmd",
|
644
|
+
".wmf" => "application/x-msmetafile",
|
645
|
+
".wml" => "text/vnd.wap.wml",
|
646
|
+
".wmlc" => "application/vnd.wap.wmlc",
|
647
|
+
".wmls" => "text/vnd.wap.wmlscript",
|
648
|
+
".wmlsc" => "application/vnd.wap.wmlscriptc",
|
649
|
+
".wmv" => "video/x-ms-wmv",
|
650
|
+
".wmx" => "video/x-ms-wmx",
|
651
|
+
".wmz" => "application/x-ms-wmz",
|
652
|
+
".woff" => "application/font-woff",
|
653
|
+
".woff2" => "application/font-woff2",
|
654
|
+
".wpd" => "application/vnd.wordperfect",
|
655
|
+
".wpl" => "application/vnd.ms-wpl",
|
656
|
+
".wps" => "application/vnd.ms-works",
|
657
|
+
".wqd" => "application/vnd.wqd",
|
658
|
+
".wri" => "application/x-mswrite",
|
659
|
+
".wrl" => "model/vrml",
|
660
|
+
".wsdl" => "application/wsdl+xml",
|
661
|
+
".wspolicy" => "application/wspolicy+xml",
|
662
|
+
".wtb" => "application/vnd.webturbo",
|
663
|
+
".wvx" => "video/x-ms-wvx",
|
664
|
+
".x3d" => "application/vnd.hzn-3d-crossword",
|
665
|
+
".xar" => "application/vnd.xara",
|
666
|
+
".xbd" => "application/vnd.fujixerox.docuworks.binder",
|
667
|
+
".xbm" => "image/x-xbitmap",
|
668
|
+
".xdm" => "application/vnd.syncml.dm+xml",
|
669
|
+
".xdp" => "application/vnd.adobe.xdp+xml",
|
670
|
+
".xdw" => "application/vnd.fujixerox.docuworks",
|
671
|
+
".xenc" => "application/xenc+xml",
|
672
|
+
".xer" => "application/patch-ops-error+xml",
|
673
|
+
".xfdf" => "application/vnd.adobe.xfdf",
|
674
|
+
".xfdl" => "application/vnd.xfdl",
|
675
|
+
".xhtml" => "application/xhtml+xml",
|
676
|
+
".xif" => "image/vnd.xiff",
|
677
|
+
".xla" => "application/vnd.ms-excel",
|
678
|
+
".xlam" => "application/vnd.ms-excel.addin.macroEnabled.12",
|
679
|
+
".xls" => "application/vnd.ms-excel",
|
680
|
+
".xlsb" => "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
681
|
+
".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
682
|
+
".xlsm" => "application/vnd.ms-excel.sheet.macroEnabled.12",
|
683
|
+
".xlt" => "application/vnd.ms-excel",
|
684
|
+
".xltx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
|
685
|
+
".xml" => "application/xml",
|
686
|
+
".xo" => "application/vnd.olpc-sugar",
|
687
|
+
".xop" => "application/xop+xml",
|
688
|
+
".xpm" => "image/x-xpixmap",
|
689
|
+
".xpr" => "application/vnd.is-xpr",
|
690
|
+
".xps" => "application/vnd.ms-xpsdocument",
|
691
|
+
".xpw" => "application/vnd.intercon.formnet",
|
692
|
+
".xsl" => "application/xml",
|
693
|
+
".xslt" => "application/xslt+xml",
|
694
|
+
".xsm" => "application/vnd.syncml+xml",
|
695
|
+
".xspf" => "application/xspf+xml",
|
696
|
+
".xul" => "application/vnd.mozilla.xul+xml",
|
697
|
+
".xwd" => "image/x-xwindowdump",
|
698
|
+
".xyz" => "chemical/x-xyz",
|
699
|
+
".yaml" => "text/yaml",
|
700
|
+
".yml" => "text/yaml",
|
701
|
+
".zaz" => "application/vnd.zzazz.deck+xml",
|
702
|
+
".zip" => "application/zip",
|
703
|
+
".zmm" => "application/vnd.handheld-entertainment+xml",
|
704
|
+
}
|
705
|
+
|
706
|
+
end
|
707
|
+
end
|