Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/sukria/Dancer

  • Loading branch information...
commit 98aec09a9ed3509aeb1055b9faa6416efacd17da 2 parents 930f678 + a798e5b
sawyer authored
Showing with 1,666 additions and 1,318 deletions.
  1. +5 −0 CHANGES
  2. +0 −46 TODO
  3. +114 −71 lib/Dancer.pm
  4. +18 −15 lib/Dancer/Config.pm
  5. +14 −18 lib/Dancer/Cookie.pm
  6. +4 −3 lib/Dancer/Cookies.pm
  7. +46 −34 lib/Dancer/Error.pm
  8. +23 −21 lib/Dancer/Exceptions.pm
  9. +781 −781 lib/Dancer/FileUtils.pm
  10. +5 −4 lib/Dancer/GetOpt.pm
  11. +12 −6 lib/Dancer/HTTP.pm
  12. +19 −14 lib/Dancer/Handler.pm
  13. +4 −8 lib/Dancer/Handler/PSGI.pm
  14. +4 −4 lib/Dancer/Handler/Standalone.pm
  15. +19 −15 lib/Dancer/Helpers.pm
  16. +2 −1  lib/Dancer/Logger.pm
  17. +2 −2 lib/Dancer/Logger/Abstract.pm
  18. +3 −3 lib/Dancer/Logger/File.pm
  19. +2 −2 lib/Dancer/Logger/LogHandler.pm
  20. +7 −7 lib/Dancer/Logger/Syslog.pm
  21. +1 −0  lib/Dancer/ModuleLoader.pm
  22. +3 −3 lib/Dancer/Object.pm
  23. +26 −23 lib/Dancer/Renderer.pm
  24. +53 −52 lib/Dancer/Request.pm
  25. +25 −14 lib/Dancer/Response.pm
  26. +132 −88 lib/Dancer/Route.pm
  27. +7 −6 lib/Dancer/Session.pm
  28. +8 −6 lib/Dancer/Session/Abstract.pm
  29. +24 −19 lib/Dancer/Session/Cookie.pm
  30. +6 −5 lib/Dancer/Session/Memcached.pm
  31. +8 −7 lib/Dancer/Session/YAML.pm
  32. +6 −5 lib/Dancer/SharedData.pm
  33. +76 −9 lib/Dancer/Template.pm
  34. +1 −0  lib/Dancer/Template/Abstract.pm
  35. +21 −16 lib/Dancer/Template/Simple.pm
  36. +9 −8 lib/Dancer/Template/TemplateToolkit.pm
  37. +2 −2 t/03_route_handler/07_compilation_warning.t
  38. +90 −0 t/03_route_handler/15_prefix.t
  39. +84 −0 t/12_response/02_headers.t
5 CHANGES
View
@@ -1,3 +1,8 @@
+Dancer 1.123~
+ * Fix a memory leak that could occur between two
+ requests under mod_perl (Thanks to Nicolas Rennert for
+ the report and diagnosis).
+
Dancer 1.122
* Fix the test suite under Perl 5.8.x
46 TODO
View
@@ -13,49 +13,3 @@
1 - GET / -> first call, so browse the route tree
2 - GET / -> second call, return cache('/');
-* Conditions support for route matching:
-
- get '/foo', {agent => 'Songbird (\d\.\d)[\d\/]*?'} => sub {
- ...
- };
-
-* Prefix support
-
- Could be great to be able to define a prefix path for each
- route hanlder defined then.
-
- Would work like the following:
-
- prefix '/home';
-
- # any route handler and before filter is applied to /home/*
-
- get '/page1' => sub { }; # will match '/home/page1';
-
- prefix undef;
- # no more prefix
-
- get '/page1' => sub { }; # will match /page1
-
- And that should also work for before filters:
-
- prefix '/home';
- before sub { must_be_authenticated }; # this filter only applies to /home/* paths
-
-
-* Headers modifier helper
-
- A route handler should be able to alter any response
- header by hand.
-
- get '/' => sub {
- ...
-
- # a user-defined header
- header 'X-User-Header1' => 'Some Random Value';
- };
-
- Those inputs will go through the
- Dancer::Response::sanitize() method in order not to let
- go an invalid response.
-
185 lib/Dancer.pm
View
@@ -22,44 +22,47 @@ use Dancer::Handler;
use base 'Exporter';
$AUTHORITY = 'SUKRIA';
-$VERSION = '1.122';
-@EXPORT = qw(
- any
- before
- cookies
- content_type
- dance
- debug
- del
- dirname
- error
- false
- get
- layout
- load
- logger
- mime_type
- options
- params
- pass
- path
- post
- put
- r
- redirect
- request
- send_file
- send_error
- set
- set_cookie
- session
- splat
- status
- template
- true
- var
- vars
- warning
+$VERSION = '1.123';
+@EXPORT = qw(
+ any
+ before
+ cookies
+ content_type
+ dance
+ debug
+ del
+ dirname
+ error
+ false
+ get
+ header
+ headers
+ layout
+ load
+ logger
+ mime_type
+ options
+ params
+ pass
+ path
+ post
+ prefix
+ put
+ r
+ redirect
+ request
+ send_file
+ send_error
+ set
+ set_cookie
+ session
+ splat
+ status
+ template
+ true
+ var
+ vars
+ warning
);
# Dancer's syntax
@@ -72,57 +75,65 @@ sub debug { Dancer::Logger->debug(@_) }
sub dirname { Dancer::FileUtils::dirname(@_) }
sub error { Dancer::Logger->error(@_) }
sub send_error { Dancer::Helpers->error(@_) }
-sub false { 0 }
-sub get { Dancer::Route->add('head', @_);
- Dancer::Route->add('get', @_);}
-sub layout { set(layout => shift) }
-sub logger { set(logger => @_) }
-sub load { require $_ for @_ }
-sub mime_type { Dancer::Config::mime_types(@_) }
-sub params { Dancer::SharedData->params }
+sub false {0}
+
+sub get {
+ Dancer::Route->add('head', @_);
+ Dancer::Route->add('get', @_);
+}
+sub headers { Dancer::Response::headers(@_); }
+sub header { goto &headers; } # goto ftw!
+sub layout { set(layout => shift) }
+sub logger { set(logger => @_) }
+sub load { require $_ for @_ }
+sub mime_type { Dancer::Config::mime_types(@_) }
+sub params { Dancer::SharedData->params }
+
# sub pass { Dancer::Response::pass() }
-sub pass { pass_exception }
-sub path { Dancer::FileUtils::path(@_) }
-sub post { Dancer::Route->add('post', @_) }
-sub del { Dancer::Route->add('delete', @_) }
-sub options { Dancer::Route->add('options', @_) }
-sub put { Dancer::Route->add('put', @_) }
-sub r { {regexp => $_[0]} }
-sub redirect { Dancer::Helpers::redirect(@_) }
-sub request { Dancer::SharedData->request }
-sub send_file { Dancer::Helpers::send_file(@_) }
-sub set { setting(@_) }
-sub set_cookie { Dancer::Helpers::set_cookie(@_) }
-sub session {
+sub pass {pass_exception}
+sub path { Dancer::FileUtils::path(@_) }
+sub post { Dancer::Route->add('post', @_) }
+sub prefix { Dancer::Route->prefix(@_) }
+sub del { Dancer::Route->add('delete', @_) }
+sub options { Dancer::Route->add('options', @_) }
+sub put { Dancer::Route->add('put', @_) }
+sub r { {regexp => $_[0]} }
+sub redirect { Dancer::Helpers::redirect(@_) }
+sub request { Dancer::SharedData->request }
+sub send_file { Dancer::Helpers::send_file(@_) }
+sub set { setting(@_) }
+sub set_cookie { Dancer::Helpers::set_cookie(@_) }
+
+sub session {
if (@_ == 0) {
return Dancer::Session->get;
}
else {
return (@_ == 1)
- ? Dancer::Session->read(@_)
- : Dancer::Session->write(@_)
+ ? Dancer::Session->read(@_)
+ : Dancer::Session->write(@_);
}
}
-sub splat { @{ Dancer::SharedData->params->{splat} } }
-sub status { Dancer::Response::status(@_) }
-sub template { Dancer::Helpers::template(@_) }
-sub true { 1 }
-sub var { Dancer::SharedData->var(@_) }
-sub vars { Dancer::SharedData->vars }
-sub warning { Dancer::Logger->warning(@_) }
+sub splat { @{Dancer::SharedData->params->{splat}} }
+sub status { Dancer::Response::status(@_) }
+sub template { Dancer::Helpers::template(@_) }
+sub true {1}
+sub var { Dancer::SharedData->var(@_) }
+sub vars { Dancer::SharedData->vars }
+sub warning { Dancer::Logger->warning(@_) }
# When importing the package, strict and warnings pragma are loaded,
# and the appdir detection is performed.
sub import {
- my ($class, $symbol) = @_;
+ my ($class, $symbol) = @_;
my ($package, $script) = caller;
strict->import;
warnings->import;
- $class->export_to_level( 1, $class, @EXPORT );
+ $class->export_to_level(1, $class, @EXPORT);
# if :syntax option exists, don't change settings
- if ( $symbol && $symbol eq ':syntax' ) {
+ if ($symbol && $symbol eq ':syntax') {
return;
}
@@ -247,6 +258,21 @@ Routes may include some matching conditions (on the useragent and the hostname a
'all browsers except songbird'
}
+=head2 PREFIX
+
+A prefix can be defined for each route handler, like this:
+
+ prefix '/home';
+
+From here, any route handler is defined to /home/*
+
+ get '/page1' => sub {}; # will match '/home/page1'
+
+You can unset the prefix value
+
+ prefix undef;
+ get '/page1' => sub {}; will match /page1
+
=head2 NAMED MATCHING
A route pattern can contain one or more tokens (a word prefixed with ':'). Each
@@ -369,6 +395,23 @@ keyword B<content_type>
# here we can dump the contents of params->{txtfile}
};
+=head2 header(s)
+
+It is possible to add custom headers to responses with the B<header> (or B<headers>)
+keyword:
+
+ get '/send/header', sub {
+ header 'X-My-Header' => 'shazam!';
+ }
+
+or...
+
+ get '/send/headers', sub {
+ headers 'X-Foo' => 'bar', X-Bar => 'foo';
+ }
+
+You can use both undistinctly, they do exactly what you expect them to do.
+
=head1 ERROR HANDLING
=head2 DEFAULT ERROR PAGES
33 lib/Dancer/Config.pm
View
@@ -14,10 +14,11 @@ use Carp 'confess';
# singleton for storing settings
my $SETTINGS = {
- # default mime_types
- mime_types => Dancer::FileUtils->mime_types,
+
+ # default mime_types
+ mime_types => Dancer::FileUtils->mime_types,
};
-sub settings { $SETTINGS }
+sub settings {$SETTINGS}
my $setters = {
logger => sub {
@@ -37,15 +38,15 @@ my $setters = {
# public accessor for get/set
sub setting {
my ($setting, $value) = @_;
-
+
# run the hook if setter
- $setters->{$setting}->(@_)
- if (@_ == 2) && defined $setters->{$setting};
+ $setters->{$setting}->(@_)
+ if (@_ == 2) && defined $setters->{$setting};
# setter/getter
- (@_ == 2)
- ? $SETTINGS->{$setting} = $value
- : $SETTINGS->{$setting} ;
+ (@_ == 2)
+ ? $SETTINGS->{$setting} = $value
+ : $SETTINGS->{$setting};
}
sub mime_types {
@@ -53,9 +54,9 @@ sub mime_types {
$SETTINGS->{mime_types} ||= {};
return $SETTINGS->{mime_types} if @_ == 0;
- return (@_ == 2)
- ? $SETTINGS->{mime_types}{$ext} = $content_type
- : $SETTINGS->{mime_types}{$ext};
+ return (@_ == 2)
+ ? $SETTINGS->{mime_types}{$ext} = $content_type
+ : $SETTINGS->{mime_types}{$ext};
}
sub conffile { path(setting('appdir'), 'config.yml') }
@@ -65,7 +66,8 @@ sub environment_file {
return path(setting('appdir'), 'environments', "$env.yml");
}
-sub load {
+sub load {
+
# look for the conffile
return 1 unless -f conffile;
@@ -89,8 +91,8 @@ sub load {
sub load_settings_from_yaml {
my ($file) = @_;
- my $config = YAML::LoadFile($file) or
- confess "Unable to parse the configuration file: $file";
+ my $config = YAML::LoadFile($file)
+ or confess "Unable to parse the configuration file: $file";
@{$SETTINGS}{keys %$config} = values %$config;
return scalar(keys %$config);
@@ -114,6 +116,7 @@ load_default_settings();
1;
__END__
+
=pod
=head1 NAME
32 lib/Dancer/Cookie.pm
View
@@ -3,44 +3,40 @@ use strict;
use warnings;
use base 'Dancer::Object';
-__PACKAGE__->attributes(
- 'name',
- 'value',
- 'expires',
- 'domain',
- 'path'
-);
+__PACKAGE__->attributes('name', 'value', 'expires', 'domain', 'path');
sub init {
my $self = shift;
if ($self->expires) {
$self->expires(_epoch_to_gmtstring($self->expires))
- if $self->expires =~ /^\d+$/;
+ if $self->expires =~ /^\d+$/;
}
$self->path('/') unless defined $self->path;
}
sub to_header {
- my $self = shift;
+ my $self = shift;
my $header = '';
- $header .= $self->name.'='.$self->value.'; ';
- $header .= "path=".$self->path."; " if $self->path;
- $header .= "expires=".$self->expires."; " if $self->expires;
- $header .= "domain=".$self->domain."; " if $self->domain;
+ $header .= $self->name . '=' . $self->value . '; ';
+ $header .= "path=" . $self->path . "; " if $self->path;
+ $header .= "expires=" . $self->expires . "; " if $self->expires;
+ $header .= "domain=" . $self->domain . "; " if $self->domain;
$header .= 'HttpOnly';
}
sub _epoch_to_gmtstring {
my ($epoch) = @_;
-
+
my ($sec, $min, $hour, $mday, $mon, $year, $wday) = gmtime($epoch);
my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my @days = qw(- Mon Tue Wed Thu Fri Sat Sun);
- return $days[$wday].", "
- . $mday."-".$months[$mon]
- . "-".($year + 1900)
- . " ${hour}:${min}:${sec} GMT";
+ return
+ $days[$wday] . ", "
+ . $mday . "-"
+ . $months[$mon] . "-"
+ . ($year + 1900)
+ . " ${hour}:${min}:${sec} GMT";
}
1;
7 lib/Dancer/Cookies.pm
View
@@ -6,7 +6,7 @@ use Dancer::Cookie;
# all cookies defined by the application are store in that singleton
# this is a hashref the represent all key/value pairs to store as cookies
my $COOKIES = {};
-sub cookies { $COOKIES }
+sub cookies {$COOKIES}
sub parse_cookie_from_env {
my $env_str = $ENV{COOKIE} || $ENV{HTTP_COOKIE};
@@ -15,7 +15,8 @@ sub parse_cookie_from_env {
my $cookies = {};
foreach my $cookie (split('; ', $env_str)) {
my ($name, $value) = split('=', $cookie);
- $cookies->{$name} = Dancer::Cookie->new(name => $name, value => $value);
+ $cookies->{$name} =
+ Dancer::Cookie->new(name => $name, value => $value);
}
return $cookies;
}
@@ -30,7 +31,7 @@ sub has_changed {
my ($name, $value) = ($cookie->{name}, $cookie->{value});
my $client_cookies = parse_cookie_from_env();
- my $search = $client_cookies->{$name};
+ my $search = $client_cookies->{$name};
return 1 unless defined $search;
return $search->value ne $value;
}
80 lib/Dancer/Error.pm
View
@@ -13,10 +13,10 @@ sub new {
my $self = \%params;
bless $self, $class;
- $self->{title} ||= "Error ".$self->code;
- $self->{type} ||= "runtime error";
-
- my $html_output = "<h2>".$self->{type}."</h2>";
+ $self->{title} ||= "Error " . $self->code;
+ $self->{type} ||= "runtime error";
+
+ my $html_output = "<h2>" . $self->{type} . "</h2>";
$html_output .= $self->backtrace;
$html_output .= $self->environment;
@@ -24,23 +24,23 @@ sub new {
return $self;
}
-sub code { $_[0]->{code} }
-sub title { $_[0]->{title} }
+sub code { $_[0]->{code} }
+sub title { $_[0]->{title} }
sub message { $_[0]->{message} }
sub backtrace {
my ($self) = @_;
-
+
$self->{message} ||= "";
- my $message = "<pre class=\"error\">".$self->{message}."</pre>";
+ my $message = "<pre class=\"error\">" . $self->{message} . "</pre>";
# the default perl warning/error pattern
my ($file, $line) = ($message =~ /at (\S+) line (\d+)/);
-
+
# the Devel::SimpleTrace pattern
- ($file, $line) = ($message =~ /at.*\((\S+):(\d+)\)/)
- unless $file and $line;
-
+ ($file, $line) = ($message =~ /at.*\((\S+):(\d+)\)/)
+ unless $file and $line;
+
# no file/line found, cannot open a file for context
return $message unless ($file and $line);
@@ -52,30 +52,32 @@ sub backtrace {
my $backtrace = $message;
-
- $backtrace .= "<div class=\"title\">"
- . "$file around line $line"
- . "</div>";
+
+ $backtrace
+ .= "<div class=\"title\">" . "$file around line $line" . "</div>";
$backtrace .= "<pre class=\"content\">";
$line--;
- my $start = (($line - 3) >= 0) ? ($line - 3) : 0;
+ my $start = (($line - 3) >= 0) ? ($line - 3) : 0;
my $stop = (($line + 3) < scalar(@lines)) ? ($line + 3) : scalar(@lines);
- for (my $l=$start; $l<=$stop; $l++) {
+ for (my $l = $start; $l <= $stop; $l++) {
chomp $lines[$l];
if ($l == $line) {
- $backtrace .= "<span class=\"nu\">"
- . tabulate($l + 1, $stop + 1)
- . "</span> <font color=\"red\">"
- . $lines[$l]."</font>\n";
+ $backtrace
+ .= "<span class=\"nu\">"
+ . tabulate($l + 1, $stop + 1)
+ . "</span> <font color=\"red\">"
+ . $lines[$l]
+ . "</font>\n";
}
else {
- $backtrace .= "<span class=\"nu\">"
- . tabulate($l + 1, $stop + 1)
- . "</span> "
- . $lines[$l]."\n";
+ $backtrace
+ .= "<span class=\"nu\">"
+ . tabulate($l + 1, $stop + 1)
+ . "</span> "
+ . $lines[$l] . "\n";
}
}
$backtrace .= "</pre>";
@@ -96,7 +98,8 @@ sub dumper {
my $content = "";
while (my ($k, $v) = each %$obj) {
- $content .= "<span class=\"key\">$k</span> : <span class=\"value\">$v</span>\n";
+ $content
+ .= "<span class=\"key\">$k</span> : <span class=\"value\">$v</span>\n";
}
return $content;
}
@@ -106,19 +109,28 @@ sub render {
return Dancer::Response->new(
status => $self->code,
headers => ['Content-Type' => 'text/html'],
- content => Dancer::Renderer->html_page(
- $self->title, $self->message, 'error'))
- if setting('show_errors');
-
+ content =>
+ Dancer::Renderer->html_page($self->title, $self->message, 'error')
+ ) if setting('show_errors');
+
return Dancer::Renderer->render_error($self->code);
}
sub environment {
my ($self) = @_;
- my $env = "<div class=\"title\">Environment</div><pre class=\"content\">".dumper(\%ENV)."</pre>";
- my $settings = "<div class=\"title\">Settings</div><pre class=\"content\">".dumper(Dancer::Config->settings)."</pre>";
- my $source = "<div class=\"title\">Stack</div><pre class=\"content\">".$self->get_caller."</pre>";
+ my $env =
+ "<div class=\"title\">Environment</div><pre class=\"content\">"
+ . dumper(\%ENV)
+ . "</pre>";
+ my $settings =
+ "<div class=\"title\">Settings</div><pre class=\"content\">"
+ . dumper(Dancer::Config->settings)
+ . "</pre>";
+ my $source =
+ "<div class=\"title\">Stack</div><pre class=\"content\">"
+ . $self->get_caller
+ . "</pre>";
return "$source $settings $env";
}
44 lib/Dancer/Exceptions.pm
View
@@ -8,31 +8,33 @@ $VERSION = 0.1;
my %e;
BEGIN {
- %e = (
- 'Dancer::Exception::Halt' => {
- description => 'Exception to halt and exit the execution of a route.',
- alias => 'halt',
- },
- 'Dancer::Exception::Pass' => {
- description => 'Passes the route evaluation to the next route block.',
- alias => 'pass_exception',
- }
- );
+ %e = (
+ 'Dancer::Exception::Halt' => {
+ description =>
+ 'Exception to halt and exit the execution of a route.',
+ alias => 'halt',
+ },
+ 'Dancer::Exception::Pass' => {
+ description =>
+ 'Passes the route evaluation to the next route block.',
+ alias => 'pass_exception',
+ }
+ );
}
use Exception::Class (%e);
sub import {
- my ($class, %args) = @_;
-
- my $caller = caller;
-
- while(my ($c, $v) = each %e) {
- {
- no strict 'refs';
- *{"${caller}::".$v->{alias}} = \&{$v->{alias}};
- }
- }
+ my ($class, %args) = @_;
+
+ my $caller = caller;
+
+ while (my ($c, $v) = each %e) {
+ {
+ no strict 'refs';
+ *{"${caller}::" . $v->{alias}} = \&{$v->{alias}};
+ }
+ }
}
-1;
+1;
1,562 lib/Dancer/FileUtils.pm
View
@@ -11,7 +11,7 @@ use vars '@EXPORT_OK';
@EXPORT_OK = qw(path dirname read_file_content read_glob_content);
-sub path { File::Spec->catfile(@_) }
+sub path { File::Spec->catfile(@_) }
sub dirname { File::Basename::dirname(@_) }
sub read_file_content {
@@ -26,7 +26,7 @@ sub read_file_content {
}
sub read_glob_content {
- my ($fh) = @_;
+ my ($fh) = @_;
binmode $fh;
my @content = <$fh>;
close $fh;
@@ -34,785 +34,785 @@ sub read_glob_content {
}
sub mime_types {
- {
- # shamelessly stolen from:
- # http://github.com/mattetti/mimetype-fu/blob/master/lib/mime_types.yml
- "3ds" => "image/x-3ds",
- "3g2" => "video/3gpp2",
- "3gp" => "video/3gpp",
- "3gpp" => "video/3gpp",
- "7z" => "application/x-7z-compressed",
- "a" => "application/x-archive",
- "aac" => "audio/mp4",
- "abw" => "application/x-abiword",
- "ac3" => "audio/ac3",
- "ace" => "application/x-ace",
- "acutc" => "application/vnd.acucorp",
- "adb" => "text/x-adasrc",
- "ads" => "text/x-adasrc",
- "afm" => "application/x-font-afm",
- "ag" => "image/x-applix-graphics",
- "ai" => "application/illustrator",
- "aif" => "audio/x-aiff",
- "aifc" => "audio/x-aiff",
- "aiff" => "audio/x-aiff",
- "al" => "application/x-perl",
- "ami" => "application/vnd.amiga.ami",
- "amr" => "audio/AMR",
- "ani" => "application/octet-stream",
- "ape" => "audio/x-ape",
- "arj" => "application/x-arj",
- "arw" => "image/x-sony-arw",
- "as" => "application/x-applix-spreadsheet",
- "asc" => "application/pgp-encrypted",
- "asf" => "video/x-ms-asf",
- "asp" => "application/x-asp",
- "ass" => "text/x-ssa",
- "asx" => "audio/x-ms-asx",
- "atc" => "application/vnd.acucorp",
- "atom" => "application/atom+xml",
- "au" => "audio/basic",
- "avi" => "video/x-msvideo",
- "aw" => "application/x-applix-word",
- "awb" => "audio/AMR-WB",
- "bak" => "application/x-trash",
- "bcpio" => "application/x-bcpio",
- "bdf" => "application/x-font-bdf",
- "bib" => "text/x-bibtex",
- "bin" => "application/x-mac",
- "bkm" => "application/vnd.nervana",
- "blend" => "application/x-blender",
- "blender" => "application/x-blender",
- "bmp" => "image/bmp",
- "bpd" => "application/vnd.hbci",
- "builder" => "application/x-ruby",
- "bz" => "application/x-bzip",
- "bz2" => "application/x-bzip",
- "c" => "text/x-csrc",
- "c++" => "text/x-c++src",
- "cab" => "application/vnd.ms-cab-compressed",
- "cbr" => "application/x-cbr",
- "cbz" => "application/x-cbz",
- "cc" => "text/x-c++src",
- "ccc" => "text/vnd.net2phone.commcenter.command",
- "cdf" => "application/x-netcdf",
- "cdr" => "application/vnd.corel-draw",
- "cdy" => "application/vnd.cinderella",
- "cer" => "application/x-x509-ca-cert",
- "cert" => "application/x-x509-ca-cert",
- "cgi" => "application/x-cgi",
- "cgm" => "image/cgm",
- "chm" => "application/x-chm",
- "chrt" => "application/x-kchart",
- "chrt" => "application/vnd.kde.kchart",
- "cil" => "application/vnd.ms-artgalry",
- "class" => "application/x-java",
- "cls" => "text/x-tex",
- "cmc" => "application/vnd.cosmocaller",
- "cpio" => "application/x-cpio",
- "cpp" => "text/x-c++src",
- "cr2" => "image/x-canon-cr2",
- "crl" => "application/pkix-crl",
- "crt" => "application/x-x509-ca-cert",
- "crw" => "image/x-canon-crw",
- "cs" => "text/x-csharp",
- "csh" => "application/x-csh",
- "css" => "text/css",
- "cssl" => "text/css",
- "csv" => "text/csv",
- "cue" => "application/x-cue",
- "cur" => "image/x-win-bitmap",
- "curl" => "application/vnd.curl",
- "cw" => "application/prs.cww",
- "cww" => "application/prs.cww",
- "cxx" => "text/x-c++src",
- "d" => "text/x-dsrc",
- "dar" => "application/x-dar",
- "dat" => "text/plain",
- "dbf" => "application/x-dbf",
- "dc" => "application/x-dc-rom",
- "dcl" => "text/x-dcl",
- "dcm" => "application/dicom",
- "dcr" => "image/x-kodak-dcr",
- "dds" => "image/x-dds",
- "deb" => "application/x-deb",
- "der" => "application/x-x509-ca-cert",
- "desktop" => "application/x-desktop",
- "dfac" => "application/vnd.dreamfactory",
- "dgn" => "image/x-vnd.dgn",
- "dia" => "application/x-dia-diagram",
- "diff" => "text/x-patch",
- "divx" => "video/x-msvideo",
- "djv" => "image/vnd.djvu",
- "djvu" => "image/vnd.djvu",
- "dl" => "video/dl",
- "dms" => "application/octet-stream",
- "dng" => "image/x-adobe-dng",
- "doc" => "application/msword",
- "docx" => "application/msword",
- "docbook" => "application/docbook+xml",
- "dot" => "application/msword",
- "dsl" => "text/x-dsl",
- "dtd" => "text/x-dtd",
- "dtx" => "text/x-tex",
- "dv" => "video/dv",
- "dvi" => "application/x-dvi",
- "dwf" => "x-drawing/dwf",
- "dwg" => "image/vnd.dwg",
- "dxf" => "image/vnd.dxf",
- "ecelp4800" => "audio/vnd.nuera.ecelp4800",
- "ecelp7470" => "audio/vnd.nuera.ecelp7470",
- "ecelp9600" => "audio/vnd.nuera.ecelp9600",
- "efif" => "application/vnd.picsel",
- "egon" => "application/x-egon",
- "el" => "text/x-emacs-lisp",
- "emf" => "image/x-emf",
- "emm" => "application/vnd.ibm.electronic-media",
- "emp" => "application/vnd.emusic-emusic_package",
- "ent" => "application/vnd.nervana",
- "entity" => "application/vnd.nervana",
- "eol" => "audio/vnd.digital-winds",
- "eps" => "image/x-eps",
- "epsf" => "image/x-eps",
- "epsi" => "image/x-eps",
- "erb" => "text/rhtml",
- "erl" => "text/x-erlang",
- "es" => "application/ecmascript",
- "etheme" => "application/x-e-theme",
- "etx" => "text/x-setext",
- "evc" => "audio/EVRC",
- "exe" => "application/x-executable",
- "ez" => "application/andrew-inset",
- "fig" => "image/x-xfig",
- "fits" => "image/x-fits",
- "flac" => "audio/x-flac",
- "flc" => "video/x-flic",
- "fli" => "video/x-flic",
- "flo" => "application/vnd.micrografx.flo",
- "flv" => "application/x-flash-video",
- "flw" => "application/x-kivio",
- "fo" => "text/x-xslfo",
- "for" => "text/x-fortran",
- "fsc" => "application/vnd.fsc.weblaunch",
- "g3" => "image/fax-g3",
- "gb" => "application/x-gameboy-rom",
- "gba" => "application/x-gba-rom",
- "gcrd" => "text/directory",
- "ged" => "application/x-gedcom",
- "gedcom" => "application/x-gedcom",
- "gen" => "application/x-genesis-rom",
- "gf" => "application/x-tex-gf",
- "gg" => "application/x-sms-rom",
- "gif" => "image/gif",
- "gif" => "image/gif",
- "gl" => "video/gl",
- "glade" => "application/x-glade",
- "gmo" => "application/x-gettext-translation",
- "gnc" => "application/x-gnucash",
- "gnucash" => "application/x-gnucash",
- "gnumeric" => "application/x-gnumeric",
- "gnuplot" => "application/x-gnuplot",
- "gp" => "application/x-gnuplot",
- "gpg" => "application/pgp-encrypted",
- "gplt" => "application/x-gnuplot",
- "gra" => "application/x-graphite",
- "gsf" => "application/x-font-type1",
- "gtar" => "application/x-tar",
- "gvp" => "text/x-google-video-pointer",
- "gz" => "application/x-gzip",
- "h" => "text/x-chdr",
- "h++" => "text/x-c++hdr",
- "hbc" => "application/vnd.hbci",
- "hbci" => "application/vnd.hbci",
- "hdf" => "application/x-hdf",
- "hh" => "text/x-c++hdr",
- "hh" => "text/plain",
- "hlp" => "text/plain",
- "hp" => "text/x-c++hdr",
- "hpgl" => "application/vnd.hp-hpgl",
- "hpp" => "text/x-c++hdr",
- "hqx" => "application/mac-binhex40",
- "hs" => "text/x-haskell",
- "htke" => "application/vnd.kenameaapp",
- "htm" => "text/html",
- "html" => "text/html",
- "htmlx" => "text/html",
- "htx" => "text/html",
- "hvd" => "application/vnd.yamaha.hv-dic",
- "hvp" => "application/vnd.yamaha.hv-voice",
- "hvs" => "application/vnd.yamaha.hv-script",
- "hwp" => "application/x-hwp",
- "hwt" => "application/x-hwt",
- "hxx" => "text/x-c++hdr",
- "ica" => "application/x-ica",
- "icb" => "image/x-tga",
- "ice" => "x-conference/x-cooltalk",
- "icns" => "image/x-icns",
- "ico" => "image/x-ico",
- "ics" => "text/calendar",
- "idl" => "text/x-idl",
- "ief" => "image/ief",
- "iff" => "image/x-iff",
- "iges" => "model/iges",
- "igs" => "model/iges",
- "igx" => "application/vnd.micrografx.igx",
- "ilbm" => "image/x-ilbm",
- "ins" => "text/x-tex",
- "irm" => "application/vnd.ibm.rights-management",
- "irp" => "application/vnd.irepository.package+xml",
- "iso" => "application/x-cd-image",
- "iso9660" => "application/x-cd-image",
- "it" => "audio/x-it",
- "j2k" => "image/jp2",
- "jad" => "text/vnd.sun.j2me.app-descriptor",
- "jar" => "application/x-java-archive",
- "java" => "text/x-java",
- "jisp" => "application/vnd.jisp",
- "jng" => "image/x-jng",
- "jnlp" => "application/x-java-jnlp-file",
- "jp2" => "image/jp2",
- "jpc" => "image/jp2",
- "jpe" => "image/jpeg",
- "jpeg" => "image/jpeg",
- "jpf" => "image/jp2",
- "jpg" => "image/jpeg",
- "jpm" => "image/jpm",
- "jpr" => "application/x-jbuilder-project",
- "jpx" => "image/jpx",
- "js" => "application/javascript",
- "k25" => "image/x-kodak-k25",
- "kar" => "audio/midi",
- "karbon" => "application/x-karbon",
- "kcm" => "application/vnd.nervana",
- "kdc" => "image/x-kodak-kdc",
- "kdelnk" => "application/x-desktop",
- "kfo" => "application/x-kformula",
- "kia" => "application/vnd.kidspiration",
- "kil" => "application/x-killustrator",
- "kino" => "application/smil",
- "kne" => "application/vnd.Kinar",
- "knp" => "application/vnd.Kinar",
- "kom" => "application/vnd.hbci",
- "kon" => "application/x-kontour",
- "kon" => "application/vnd.kde.kontour",
- "kpm" => "application/x-kpovmodeler",
- "kpr" => "application/x-kpresenter",
- "kpt" => "application/x-kpresenter",
- "kra" => "application/x-krita",
- "ksp" => "application/x-kspread",
- "kud" => "application/x-kugar",
- "kwd" => "application/x-kword",
- "kwt" => "application/x-kword",
- "l16" => "audio/L16",
- "la" => "application/x-shared-library-la",
- "latex" => "text/x-tex",
- "lbd" => "application/vnd.llamagraphics.life-balance.desktop",
- "lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
- "ldif" => "text/x-ldif",
- "les" => "application/vnd.hhe.lesson-player",
- "lha" => "application/x-lha",
- "lhs" => "text/x-literate-haskell",
- "lhz" => "application/x-lhz",
- "log" => "text/x-log",
- "lrm" => "application/vnd.ms-lrm",
- "ltx" => "text/x-tex",
- "lua" => "text/x-lua",
- "lvp" => "audio/vnd.lucent.voice",
- "lwo" => "image/x-lwo",
- "lwob" => "image/x-lwo",
- "lws" => "image/x-lws",
- "lyx" => "application/x-lyx",
- "lzh" => "application/x-lha",
- "lzo" => "application/x-lzop",
- "m" => "text/x-objcsrc",
- "m15" => "audio/x-mod",
- "m2t" => "video/mpeg",
- "m3u" => "audio/x-mpegurl",
- "m4" => "application/x-m4",
- "m4a" => "audio/mp4",
- "m4b" => "audio/x-m4b",
- "m4u" => "video/vnd.mpegurl",
- "m4v" => "video/mp4",
- "mab" => "application/x-markaby",
- "man" => "application/x-troff-man",
- "mcd" => "application/vnd.mcd",
- "md" => "application/x-genesis-rom",
- "mdb" => "application/vnd.ms-access",
- "mdi" => "image/vnd.ms-modi",
- "me" => "text/x-troff-me",
- "me" => "application/x-troff-me",
- "mesh" => "model/mesh",
- "mfm" => "application/vnd.mfmp",
- "mgp" => "application/x-magicpoint",
- "mid" => "audio/midi",
- "midi" => "audio/midi",
- "mif" => "application/x-mif",
- "minipsf" => "audio/x-minipsf",
- "mj2" => "video/MJ2",
- "mjp2" => "video/MJ2",
- "mka" => "audio/x-matroska",
- "mkv" => "video/x-matroska",
- "ml" => "text/x-ocaml",
- "mli" => "text/x-ocaml",
- "mm" => "text/x-troff-mm",
- "mmf" => "application/vnd.smaf",
- "mml" => "text/mathml",
- "mng" => "video/x-mng",
- "mo" => "application/x-gettext-translation",
- "moc" => "text/x-moc",
- "mod" => "audio/x-mod",
- "moov" => "video/quicktime",
- "mov" => "video/quicktime",
- "movie" => "video/x-sgi-movie",
- "\"mp+\"" => "audio/x-musepack",
- "mp2" => "audio/mp2",
- "mp2" => "video/mpeg",
- "mp3" => "audio/mpeg",
- "mp3g" => "video/mpeg",
- "mp4" => "video/mp4",
- "mpc" => "audio/x-musepack",
- "mpe" => "video/mpeg",
- "mpeg" => "video/mpeg",
- "mpg" => "video/mpeg",
- "mpga" => "audio/mpeg",
- "mpm" => "application/vnd.blueice.multipass",
- "mpn" => "application/vnd.mophun.application",
- "mpp" => "application/vnd.ms-project",
- "mrw" => "image/x-minolta-mrw",
- "ms" => "text/x-troff-ms",
- "mseq" => "application/vnd.mseq",
- "msh" => "model/mesh",
- "msod" => "image/x-msod",
- "msx" => "application/x-msx-rom",
- "mtm" => "audio/x-mod",
- "mup" => "text/x-mup",
- "mxmf" => "audio/vnd.nokia.mobile-xmf",
- "mxu" => "video/vnd.mpegurl",
- "n64" => "application/x-n64-rom",
- "nb" => "application/mathematica",
- "nc" => "application/x-netcdf",
- "nds" => "application/x-nintendo-ds-rom",
- "nef" => "image/x-nikon-nef",
- "nes" => "application/x-nes-rom",
- "nfo" => "text/x-readme",
- "nim" => "video/vnd.nokia.interleaved-multimedia",
- "not" => "text/x-mup",
- "nsc" => "application/x-netshow-channel",
- "nsv" => "video/x-nsv",
- "o" => "application/x-object",
- "obj" => "application/x-tgif",
- "ocl" => "text/x-ocl",
- "oda" => "application/oda",
- "odb" => "application/vnd.oasis.opendocument.database",
- "odc" => "application/vnd.oasis.opendocument.chart",
- "odf" => "application/vnd.oasis.opendocument.formula",
- "odg" => "application/vnd.oasis.opendocument.graphics",
- "odi" => "application/vnd.oasis.opendocument.image",
- "odm" => "application/vnd.oasis.opendocument.text-master",
- "odp" => "application/vnd.oasis.opendocument.presentation",
- "ods" => "application/vnd.oasis.opendocument.spreadsheet",
- "odt" => "application/vnd.oasis.opendocument.text",
- "oga" => "audio/ogg",
- "ogg" => "application/ogg",
- "ogm" => "video/x-ogm+ogg",
- "ogv" => "video/ogg",
- "ogx" => "application/ogg",
- "old" => "application/x-trash",
- "oleo" => "application/x-oleo",
- "opml" => "text/x-opml+xml",
- "oprc" => "application/vnd.palm",
- "orf" => "image/x-olympus-orf",
- "otg" => "application/vnd.oasis.opendocument.graphics-template",
- "oth" => "application/vnd.oasis.opendocument.text-web",
- "otp" => "application/vnd.oasis.opendocument.presentation-template",
- "ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
- "ott" => "application/vnd.oasis.opendocument.text-template",
- "owl" => "text/rdf",
- "p" => "text/x-pascal",
- "p10" => "application/pkcs10",
- "p12" => "application/x-pkcs12",
- "p7c" => "application/pkcs7-mime",
- "p7m" => "application/pkcs7-mime",
- "p7s" => "application/pkcs7-signature",
- "pak" => "application/x-pak",
- "par2" => "application/x-par2",
- "pas" => "text/x-pascal",
- "patch" => "text/x-patch",
- "pbm" => "image/x-portable-bitmap",
- "pcd" => "image/x-photo-cd",
- "pcf" => "application/x-font-pcf",
- "pcl" => "application/vnd.hp-pcl",
- "pdb" => "application/x-palm-database",
- "pdf" => "application/pdf",
- "pef" => "image/x-pentax-pef",
- "pem" => "application/x-x509-ca-cert",
- "perl" => "application/x-perl",
- "pfa" => "application/x-font-type1",
- "pfb" => "application/x-font-type1",
- "pfr" => "application/font-tdpfr",
- "pfx" => "application/x-pkcs12",
- "pgb" => "image/vnd.globalgraphics.pgb",
- "pgm" => "image/x-portable-graymap",
- "pgn" => "application/x-chess-pgn",
- "pgp" => "application/pgp-encrypted",
- "php" => "application/x-php",
- "php3" => "application/x-php",
- "php4" => "application/x-php",
- "pict" => "image/x-pict",
- "pict1" => "image/x-pict",
- "pict2" => "image/x-pict",
- "pk" => "application/x-tex-pk",
- "pkd" => "application/vnd.hbci",
- "pki" => "application/pkixcmp",
- "pkipath" => "application/pkix-pkipath",
- "pkr" => "application/pgp-keys",
- "pl" => "application/x-perl",
- "pla" => "audio/x-iriver-pla",
- "plb" => "application/vnd.3gpp.pic-bw-large",
- "plj" => "audio/vnd.everad.plj",
- "pln" => "application/x-planperfect",
- "pls" => "audio/x-scpls",
- "plt" => "application/vnd.hp-HPGL",
- "pm" => "application/x-perl",
- "png" => "image/png",
- "pnm" => "image/x-portable-anymap",
- "pntg" => "image/x-macpaint",
- "po" => "text/x-gettext-translation",
- "pot" => "application/vnd.ms-powerpoint",
- "ppm" => "image/x-portable-pixmap",
- "pps" => "application/vnd.ms-powerpoint",
- "ppt" => "application/vnd.ms-powerpoint",
- "pptx" => "application/vnd.ms-powerpoint",
- "ppz" => "application/vnd.ms-powerpoint",
- "pqa" => "application/vnd.palm",
- "prc" => "application/x-palm-database",
- "ps" => "application/postscript",
- "psb" => "application/vnd.3gpp.pic-bw-small",
- "psd" => "image/x-psd",
- "psf" => "application/x-font-linux-psf",
- "psf" => "audio/x-psf",
- "psflib" => "audio/x-psflib",
- "psid" => "audio/prs.sid",
- "psp" => "image/x-paintshoppro",
- "pspimage" => "image/x-paintshoppro",
- "pti" => "application/vnd.pvi.ptid1",
- "ptid" => "application/vnd.pvi.ptid1",
- "pvb" => "application/vnd.3gpp.pic-bw-var",
- "pw" => "application/x-pw",
- "py" => "text/x-python",
- "pyc" => "application/x-python-bytecode",
- "pyo" => "application/x-python-bytecode",
- "qcp" => "audio/QCELP",
- "qif" => "image/x-quicktime",
- "qt" => "video/quicktime",
- "qtif" => "image/x-quicktime",
- "qtl" => "application/x-quicktime-media-link",
- "qtvr" => "video/quicktime",
- "qwd" => "application/vnd.Quark.QuarkXPress",
- "qwt" => "application/vnd.Quark.QuarkXPress",
- "qxb" => "application/vnd.Quark.QuarkXPress",
- "qxd" => "application/vnd.Quark.QuarkXPress",
- "qxl" => "application/vnd.Quark.QuarkXPress",
- "qxt" => "application/vnd.Quark.QuarkXPress",
- "ra" => "audio/vnd.rn-realaudio",
- "raf" => "image/x-fuji-raf",
- "ram" => "audio/x-pn-realaudio",
- "rar" => "application/x-rar",
- "ras" => "image/x-cmu-raster",
- "raw" => "image/x-panasonic-raw",
- "rax" => "audio/vnd.rn-realaudio",
- "rb" => "application/x-ruby",
- "rcprofile" => "application/vnd.ipunplugged.rcprofile",
- "rct" => "application/prs.nprend",
- "rdf" => "text/rdf",
- "rdfs" => "text/rdf",
- "rdz" => "application/vnd.data-vision.rdz",
- "rej" => "application/x-reject",
- "req" => "application/vnd.nervana",
- "request" => "application/vnd.nervana",
- "rgb" => "image/x-rgb",
- "rhtml" => "text/rhtml",
- "rle" => "image/rle",
- "rm" => "application/vnd.rn-realmedia",
- "rmj" => "application/vnd.rn-realmedia",
- "rmm" => "application/vnd.rn-realmedia",
- "rms" => "application/vnd.rn-realmedia",
- "rmvb" => "application/vnd.rn-realmedia",
- "rmx" => "application/vnd.rn-realmedia",
- "rnd" => "application/prs.nprend",
- "roff" => "text/troff",
- "rp" => "image/vnd.rn-realpix",
- "rpm" => "application/x-rpm",
- "rpss" => "application/vnd.nokia.radio-presets",
- "rpst" => "application/vnd.nokia.radio-preset",
- "rss" => "application/rss+xml",
- "rst" => "text/prs.fallenstein.rst",
- "rt" => "text/vnd.rn-realtext",
- "rtf" => "application/rtf",
- "rtx" => "text/richtext",
- "rxml" => "application/x-ruby",
- "rv" => "video/vnd.rn-realvideo",
- "rvx" => "video/vnd.rn-realvideo",
- "s11" => "video/vnd.sealed.mpeg1",
- "s14" => "video/vnd.sealed.mpeg4",
- "s1a" => "application/vnd.sealedmedia.softseal.pdf",
- "s1e" => "application/vnd.sealed.xls",
- "s1g" => "image/vnd.sealedmedia.softseal.gif",
- "s1h" => "application/vnd.sealedmedia.softseal.html",
- "s1j" => "image/vnd.sealedmedia.softseal.jpg",
- "s1m" => "audio/vnd.sealedmedia.softseal.mpeg",
- "s1n" => "image/vnd.sealed.png",
- "s1p" => "application/vnd.sealed.ppt",
- "s1q" => "video/vnd.sealedmedia.softseal.mov",
- "s1w" => "application/vnd.sealed.doc",
- "s3m" => "audio/x-s3m",
- "saf" => "application/vnd.yamaha.smaf-audio",
- "sam" => "application/x-amipro",
- "sami" => "application/x-sami",
- "sc" => "application/vnd.ibm.secure-container",
- "scm" => "text/x-scheme",
- "sda" => "application/vnd.stardivision.draw",
- "sdc" => "application/vnd.stardivision.calc",
- "sdd" => "application/vnd.stardivision.impress",
- "sdf" => "application/vnd.Kinar",
- "sdo" => "application/vnd.sealed.doc",
- "sdoc" => "application/vnd.sealed.doc",
- "sdp" => "application/vnd.stardivision.impress",
- "sds" => "application/vnd.stardivision.chart",
- "sdw" => "application/vnd.stardivision.writer",
- "see" => "application/vnd.seemail",
- "sem" => "application/vnd.sealed.eml",
- "seml" => "application/vnd.sealed.eml",
- "ser" => "application/x-java-serialized-object",
- "sgf" => "application/x-go-sgf",
- "sgi" => "image/vnd.sealedmedia.softseal.gif",
- "sgif" => "image/vnd.sealedmedia.softseal.gif",
- "sgl" => "application/vnd.stardivision.writer",
- "sgm" => "text/sgml",
- "sgml" => "text/sgml",
- "sh" => "application/x-shellscript",
- "shar" => "application/x-shar",
- "shn" => "application/x-shorten",
- "shtml" => "text/html",
- "si" => "text/vnd.wap.si",
- "siag" => "application/x-siag",
- "sic" => "application/vnd.wap.sic",
- "sid" => "audio/prs.sid",
- "sig" => "application/pgp-signature",
- "sik" => "application/x-trash",
- "silo" => "model/mesh",
- "sis" => "application/vnd.symbian.install",
- "sisx" => "x-epoc/x-sisx-app",
- "sit" => "application/stuffit",
- "siv" => "application/sieve",
- "sjp" => "image/vnd.sealedmedia.softseal.jpg",
- "sjpg" => "image/vnd.sealedmedia.softseal.jpg",
- "skr" => "application/pgp-keys",
- "sl" => "text/vnd.wap.sl",
- "slc" => "application/vnd.wap.slc",
- "slk" => "text/spreadsheet",
- "smc" => "application/x-snes-rom",
- "smd" => "application/vnd.stardivision.mail",
- "smf" => "application/vnd.stardivision.math",
- "smh" => "application/vnd.sealed.mht",
- "smht" => "application/vnd.sealed.mht",
- "smi" => "application/smil",
- "smil" => "application/smil",
- "sml" => "application/smil",
- "smo" => "video/vnd.sealedmedia.softseal.mov",
- "smov" => "video/vnd.sealedmedia.softseal.mov",
- "smp" => "audio/vnd.sealedmedia.softseal.mpeg",
- "smp3" => "audio/vnd.sealedmedia.softseal.mpeg",
- "smpg" => "video/vnd.sealed.mpeg4",
- "sms" => "application/vnd.3gpp.sms",
- "smv" => "audio/SMV",
- "snd" => "audio/basic",
- "so" => "application/x-sharedlib",
- "soc" => "application/sgml-open-catalog",
- "spd" => "application/vnd.sealedmedia.softseal.pdf",
- "spdf" => "application/vnd.sealedmedia.softseal.pdf",
- "spec" => "text/x-rpm-spec",
- "spf" => "application/vnd.yamaha.smaf-phrase",
- "spl" => "application/x-shockwave-flash",
- "spn" => "image/vnd.sealed.png",
- "spng" => "image/vnd.sealed.png",
- "spp" => "application/vnd.sealed.ppt",
- "sppt" => "application/vnd.sealed.ppt",
- "spx" => "audio/x-speex",
- "sql" => "text/x-sql",
- "sr2" => "image/x-sony-sr2",
- "src" => "application/x-wais-source",
- "srf" => "image/x-sony-srf",
- "srt" => "application/x-subrip",
- "ssa" => "text/x-ssa",
- "ssw" => "video/vnd.sealed.swf",
- "sswf" => "video/vnd.sealed.swf",
- "stc" => "application/vnd.sun.xml.calc.template",
- "std" => "application/vnd.sun.xml.draw.template",
- "sti" => "application/vnd.sun.xml.impress.template",
- "stk" => "application/hyperstudio",
- "stm" => "application/vnd.sealedmedia.softseal.html",
- "stml" => "application/vnd.sealedmedia.softseal.html",
- "stw" => "application/vnd.sun.xml.writer.template",
- "sty" => "text/x-tex",
- "sub" => "text/x-mpsub",
- "sun" => "image/x-sun-raster",
- "sus" => "application/vnd.sus-calendar",
- "susp" => "application/vnd.sus-calendar",
- "sv4cpio" => "application/x-sv4cpio",
- "sv4crc" => "application/x-sv4crc",
- "svg" => "image/svg+xml",
- "svgz" => "image/svg+xml-compressed",
- "swf" => "application/x-shockwave-flash",
- "sxc" => "application/vnd.sun.xml.calc",
- "sxd" => "application/vnd.sun.xml.draw",
- "sxg" => "application/vnd.sun.xml.writer.global",
- "sxl" => "application/vnd.sealed.xls",
- "sxls" => "application/vnd.sealed.xls",
- "sxm" => "application/vnd.sun.xml.math",
- "sxw" => "application/vnd.sun.xml.writer",
- "sylk" => "text/spreadsheet",
- "t" => "text/troff",
- "t2t" => "text/x-txt2tags",
- "tar" => "application/x-tar",
- "tbz" => "application/x-bzip-compressed-tar",
- "tbz2" => "application/x-bzip-compressed-tar",
- "tcl" => "text/x-tcl",
- "tex" => "text/x-tex",
- "texi" => "text/x-texinfo",
- "texinfo" => "text/x-texinfo",
- "tga" => "image/x-tga",
- "tgz" => "application/x-compressed-tar",
- "theme" => "application/x-theme",
- "tif" => "image/tiff",
- "tiff" => "image/tiff",
- "tk" => "text/x-tcl",
- "tnef" => "application/vnd.ms-tnef",
- "tnf" => "application/vnd.ms-tnef",
- "torrent" => "application/x-bittorrent",
- "tpic" => "image/x-tga",
- "tr" => "text/troff",
- "troff" => "text/troff",
- "ts" => "application/x-linguist",
- "tsv" => "text/tab-separated-values",
- "tta" => "audio/x-tta",
- "ttc" => "application/x-font-ttf",
- "ttf" => "application/x-font-ttf",
- "txd" => "application/vnd.genomatix.tuxedo",
- "txt" => "text/plain",
- "tzo" => "application/x-tzo",
- "ufraw" => "application/x-ufraw",
- "ui" => "application/x-designer",
- "uil" => "text/x-uil",
- "ult" => "audio/x-mod",
- "uni" => "audio/x-mod",
- "upa" => "application/vnd.hbci",
- "url" => "text/x-uri",
- "ustar" => "application/x-ustar",
- "vala" => "text/x-vala",
- "vbk" => "audio/vnd.nortel.vbk",
- "vcf" => "text/x-vcard",
- "vcs" => "text/x-vcalendar",
- "vct" => "text/directory",
- "vda" => "image/x-tga",
- "vhd" => "text/x-vhdl",
- "vhdl" => "text/x-vhdl",
- "vis" => "application/vnd.visionary",
- "viv" => "video/vivo",
- "vivo" => "video/vivo",
- "vlc" => "audio/x-mpegurl",
- "vob" => "video/mpeg",
- "voc" => "audio/x-voc",
- "vor" => "application/vnd.stardivision.writer",
- "vrml" => "x-world/x-vrml",
- "vsc" => "application/vnd.vidsoft.vidconference",
- "vsd" => "application/vnd.visio",
- "vss" => "application/vnd.visio",
- "vst" => "application/vnd.visio",
- "vsw" => "application/vnd.visio",
- "wav" => "audio/x-wav",
- "wax" => "audio/x-ms-asx",
- "wb1" => "application/x-quattropro",
- "wb2" => "application/x-quattropro",
- "wb3" => "application/x-quattropro",
- "wbmp" => "image/vnd.wap.wbmp",
- "wbs" => "application/vnd.criticaltools.wbs+xml",
- "wbxml" => "application/vnd.wap.wbxml",
- "wif" => "application/watcherinfo+xml",
- "wk1" => "application/vnd.lotus-1-2-3",
- "wk3" => "application/vnd.lotus-1-2-3",
- "wk4" => "application/vnd.lotus-1-2-3",
- "wks" => "application/vnd.lotus-1-2-3",
- "wm" => "video/x-ms-wm",
- "wma" => "audio/x-ms-wma",
- "wmd" => "application/x-ms-wmd",
- "wmf" => "image/x-wmf",
- "wml" => "text/vnd.wap.wml",
- "wmlc" => "application/vnd.wap.wmlc",
- "wmls" => "text/vnd.wap.wmlscript",
- "wmlsc" => "application/vnd.wap.wmlscriptc",
- "wmv" => "video/x-ms-wmv",
- "wmx" => "audio/x-ms-asx",
- "wmz" => "application/x-ms-wmz",
- "wp" => "application/vnd.wordperfect",
- "wp4" => "application/vnd.wordperfect",
- "wp5" => "application/vnd.wordperfect",
- "wp6" => "application/vnd.wordperfect",
- "wpd" => "application/vnd.wordperfect",
- "wpg" => "application/x-wpg",
- "wpl" => "application/vnd.ms-wpl",
- "wpp" => "application/vnd.wordperfect",
- "wqd" => "application/vnd.wqd",
- "wri" => "application/x-mswrite",
- "wrl" => "x-world/x-vrml",
- "wtb" => "application/vnd.webturbo",
- "wv" => "audio/x-wavpack",
- "wvc" => "audio/x-wavpack-correction",
- "wvp" => "audio/x-wavpack",
- "wvx" => "audio/x-ms-asx",
- "x_b" => "model/vnd.parasolid.transmit.binary",
- "x_t" => "model/vnd.parasolid.transmit.text",
- "x3f" => "image/x-sigma-x3f",
- "xac" => "application/x-gnucash",
- "xbel" => "application/x-xbel",
- "xbl" => "application/xml",
- "xbm" => "image/x-xbitmap",
- "xcf" => "image/x-xcf",
- "xfdf" => "application/vnd.adobe.xfdf",
- "xhtml" => "application/xhtml+xml",
- "xi" => "audio/x-xi",
- "xla" => "application/vnd.ms-excel",
- "xlc" => "application/vnd.ms-excel",
- "xld" => "application/vnd.ms-excel",
- "xlf" => "application/x-xliff",
- "xliff" => "application/x-xliff",
- "xll" => "application/vnd.ms-excel",
- "xlm" => "application/vnd.ms-excel",
- "xls" => "application/vnd.ms-excel",
- "xlsx" => "application/vnd.ms-excel",
- "xlt" => "application/vnd.ms-excel",
- "xlw" => "application/vnd.ms-excel",
- "xm" => "audio/x-xm",
- "xmi" => "text/x-xmi",
- "xml" => "text/xml",
- "xmt_bin" => "model/vnd.parasolid.transmit.binary",
- "xmt_txt" => "model/vnd.parasolid.transmit.text",
- "xpm" => "image/x-xpixmap",
- "xps" => "application/vnd.ms-xpsdocument",
- "xsl" => "application/xml",
- "xslfo" => "text/x-xslfo",
- "xslt" => "application/xml",
- "xspf" => "application/xspf+xml",
- "xul" => "application/vnd.mozilla.xul+xml",
- "xwd" => "image/x-xwindowdump",
- "xyz" => "x-chemical/x-xyz",
- "yaml" => "text/x-yaml",
- "yml" => "text/x-yaml",
- "z" => "application/x-compressed",
- "zabw" => "application/x-abiword",
- "zip" => "application/zip",
- "zoo" => "application/x-zoo",
- }
+ {
+
+ # shamelessly stolen from:
+ # http://github.com/mattetti/mimetype-fu/blob/master/lib/mime_types.yml
+ "3ds" => "image/x-3ds",
+ "3g2" => "video/3gpp2",
+ "3gp" => "video/3gpp",
+ "3gpp" => "video/3gpp",
+ "7z" => "application/x-7z-compressed",
+ "a" => "application/x-archive",
+ "aac" => "audio/mp4",
+ "abw" => "application/x-abiword",
+ "ac3" => "audio/ac3",
+ "ace" => "application/x-ace",
+ "acutc" => "application/vnd.acucorp",
+ "adb" => "text/x-adasrc",
+ "ads" => "text/x-adasrc",
+ "afm" => "application/x-font-afm",
+ "ag" => "image/x-applix-graphics",
+ "ai" => "application/illustrator",
+ "aif" => "audio/x-aiff",
+ "aifc" => "audio/x-aiff",
+ "aiff" => "audio/x-aiff",
+ "al" => "application/x-perl",
+ "ami" => "application/vnd.amiga.ami",
+ "amr" => "audio/AMR",
+ "ani" => "application/octet-stream",
+ "ape" => "audio/x-ape",
+ "arj" => "application/x-arj",
+ "arw" => "image/x-sony-arw",
+ "as" => "application/x-applix-spreadsheet",
+ "asc" => "application/pgp-encrypted",
+ "asf" => "video/x-ms-asf",
+ "asp" => "application/x-asp",
+ "ass" => "text/x-ssa",
+ "asx" => "audio/x-ms-asx",
+ "atc" => "application/vnd.acucorp",
+ "atom" => "application/atom+xml",
+ "au" => "audio/basic",
+ "avi" => "video/x-msvideo",
+ "aw" => "application/x-applix-word",
+ "awb" => "audio/AMR-WB",
+ "bak" => "application/x-trash",
+ "bcpio" => "application/x-bcpio",
+ "bdf" => "application/x-font-bdf",
+ "bib" => "text/x-bibtex",
+ "bin" => "application/x-mac",
+ "bkm" => "application/vnd.nervana",
+ "blend" => "application/x-blender",
+ "blender" => "application/x-blender",
+ "bmp" => "image/bmp",
+ "bpd" => "application/vnd.hbci",
+ "builder" => "application/x-ruby",
+ "bz" => "application/x-bzip",
+ "bz2" => "application/x-bzip",
+ "c" => "text/x-csrc",
+ "c++" => "text/x-c++src",
+ "cab" => "application/vnd.ms-cab-compressed",
+ "cbr" => "application/x-cbr",
+ "cbz" => "application/x-cbz",
+ "cc" => "text/x-c++src",
+ "ccc" => "text/vnd.net2phone.commcenter.command",
+ "cdf" => "application/x-netcdf",
+ "cdr" => "application/vnd.corel-draw",
+ "cdy" => "application/vnd.cinderella",
+ "cer" => "application/x-x509-ca-cert",
+ "cert" => "application/x-x509-ca-cert",
+ "cgi" => "application/x-cgi",
+ "cgm" => "image/cgm",
+ "chm" => "application/x-chm",
+ "chrt" => "application/x-kchart",
+ "chrt" => "application/vnd.kde.kchart",
+ "cil" => "application/vnd.ms-artgalry",
+ "class" => "application/x-java",
+ "cls" => "text/x-tex",
+ "cmc" => "application/vnd.cosmocaller",
+ "cpio" => "application/x-cpio",
+ "cpp" => "text/x-c++src",
+ "cr2" => "image/x-canon-cr2",
+ "crl" => "application/pkix-crl",
+ "crt" => "application/x-x509-ca-cert",
+ "crw" => "image/x-canon-crw",
+ "cs" => "text/x-csharp",
+ "csh" => "application/x-csh",
+ "css" => "text/css",
+ "cssl" => "text/css",
+ "csv" => "text/csv",
+ "cue" => "application/x-cue",
+ "cur" => "image/x-win-bitmap",
+ "curl" => "application/vnd.curl",
+ "cw" => "application/prs.cww",
+ "cww" => "application/prs.cww",
+ "cxx" => "text/x-c++src",
+ "d" => "text/x-dsrc",
+ "dar" => "application/x-dar",
+ "dat" => "text/plain",
+ "dbf" => "application/x-dbf",
+ "dc" => "application/x-dc-rom",
+ "dcl" => "text/x-dcl",
+ "dcm" => "application/dicom",
+ "dcr" => "image/x-kodak-dcr",
+ "dds" => "image/x-dds",
+ "deb" => "application/x-deb",
+ "der" => "application/x-x509-ca-cert",
+ "desktop" => "application/x-desktop",
+ "dfac" => "application/vnd.dreamfactory",
+ "dgn" => "image/x-vnd.dgn",
+ "dia" => "application/x-dia-diagram",
+ "diff" => "text/x-patch",
+ "divx" => "video/x-msvideo",
+ "djv" => "image/vnd.djvu",
+ "djvu" => "image/vnd.djvu",
+ "dl" => "video/dl",
+ "dms" => "application/octet-stream",
+ "dng" => "image/x-adobe-dng",
+ "doc" => "application/msword",
+ "docx" => "application/msword",
+ "docbook" => "application/docbook+xml",
+ "dot" => "application/msword",
+ "dsl" => "text/x-dsl",
+ "dtd" => "text/x-dtd",
+ "dtx" => "text/x-tex",
+ "dv" => "video/dv",
+ "dvi" => "application/x-dvi",
+ "dwf" => "x-drawing/dwf",
+ "dwg" => "image/vnd.dwg",
+ "dxf" => "image/vnd.dxf",
+ "ecelp4800" => "audio/vnd.nuera.ecelp4800",
+ "ecelp7470" => "audio/vnd.nuera.ecelp7470",
+ "ecelp9600" => "audio/vnd.nuera.ecelp9600",
+ "efif" => "application/vnd.picsel",
+ "egon" => "application/x-egon",
+ "el" => "text/x-emacs-lisp",
+ "emf" => "image/x-emf",
+ "emm" => "application/vnd.ibm.electronic-media",
+ "emp" => "application/vnd.emusic-emusic_package",
+ "ent" => "application/vnd.nervana",
+ "entity" => "application/vnd.nervana",
+ "eol" => "audio/vnd.digital-winds",
+ "eps" => "image/x-eps",
+ "epsf" => "image/x-eps",
+ "epsi" => "image/x-eps",
+ "erb" => "text/rhtml",
+ "erl" => "text/x-erlang",
+ "es" => "application/ecmascript",
+ "etheme" => "application/x-e-theme",
+ "etx" => "text/x-setext",
+ "evc" => "audio/EVRC",
+ "exe" => "application/x-executable",
+ "ez" => "application/andrew-inset",
+ "fig" => "image/x-xfig",
+ "fits" => "image/x-fits",
+ "flac" => "audio/x-flac",
+ "flc" => "video/x-flic",
+ "fli" => "video/x-flic",
+ "flo" => "application/vnd.micrografx.flo",
+ "flv" => "application/x-flash-video",
+ "flw" => "application/x-kivio",
+ "fo" => "text/x-xslfo",
+ "for" => "text/x-fortran",
+ "fsc" => "application/vnd.fsc.weblaunch",
+ "g3" => "image/fax-g3",
+ "gb" => "application/x-gameboy-rom",
+ "gba" => "application/x-gba-rom",
+ "gcrd" => "text/directory",
+ "ged" => "application/x-gedcom",
+ "gedcom" => "application/x-gedcom",
+ "gen" => "application/x-genesis-rom",
+ "gf" => "application/x-tex-gf",
+ "gg" => "application/x-sms-rom",
+ "gif" => "image/gif",
+ "gif" => "image/gif",
+ "gl" => "video/gl",
+ "glade" => "application/x-glade",
+ "gmo" => "application/x-gettext-translation",
+ "gnc" => "application/x-gnucash",
+ "gnucash" => "application/x-gnucash",
+ "gnumeric" => "application/x-gnumeric",
+ "gnuplot" => "application/x-gnuplot",
+ "gp" => "application/x-gnuplot",
+ "gpg" => "application/pgp-encrypted",
+ "gplt" => "application/x-gnuplot",
+ "gra" => "application/x-graphite",
+ "gsf" => "application/x-font-type1",
+ "gtar" => "application/x-tar",
+ "gvp" => "text/x-google-video-pointer",
+ "gz" => "application/x-gzip",
+ "h" => "text/x-chdr",
+ "h++" => "text/x-c++hdr",
+ "hbc" => "application/vnd.hbci",
+ "hbci" => "application/vnd.hbci",
+ "hdf" => "application/x-hdf",
+ "hh" => "text/x-c++hdr",
+ "hh" => "text/plain",
+ "hlp" => "text/plain",
+ "hp" => "text/x-c++hdr",
+ "hpgl" => "application/vnd.hp-hpgl",
+ "hpp" => "text/x-c++hdr",
+ "hqx" => "application/mac-binhex40",
+ "hs" => "text/x-haskell",
+ "htke" => "application/vnd.kenameaapp",
+ "htm" => "text/html",
+ "html" => "text/html",
+ "htmlx" => "text/html",
+ "htx" => "text/html",
+ "hvd" => "application/vnd.yamaha.hv-dic",
+ "hvp" => "application/vnd.yamaha.hv-voice",
+ "hvs" => "application/vnd.yamaha.hv-script",
+ "hwp" => "application/x-hwp",
+ "hwt" => "application/x-hwt",
+ "hxx" => "text/x-c++hdr",
+ "ica" => "application/x-ica",
+ "icb" => "image/x-tga",
+ "ice" => "x-conference/x-cooltalk",
+ "icns" => "image/x-icns",
+ "ico" => "image/x-ico",
+ "ics" => "text/calendar",
+ "idl" => "text/x-idl",
+ "ief" => "image/ief",
+ "iff" => "image/x-iff",
+ "iges" => "model/iges",
+ "igs" => "model/iges",
+ "igx" => "application/vnd.micrografx.igx",
+ "ilbm" => "image/x-ilbm",
+ "ins" => "text/x-tex",
+ "irm" => "application/vnd.ibm.rights-management",
+ "irp" => "application/vnd.irepository.package+xml",
+ "iso" => "application/x-cd-image",
+ "iso9660" => "application/x-cd-image",
+ "it" => "audio/x-it",
+ "j2k" => "image/jp2",
+ "jad" => "text/vnd.sun.j2me.app-descriptor",
+ "jar" => "application/x-java-archive",
+ "java" => "text/x-java",
+ "jisp" => "application/vnd.jisp",
+ "jng" => "image/x-jng",
+ "jnlp" => "application/x-java-jnlp-file",
+ "jp2" => "image/jp2",
+ "jpc" => "image/jp2",
+ "jpe" => "image/jpeg",
+ "jpeg" => "image/jpeg",
+ "jpf" => "image/jp2",
+ "jpg" => "image/jpeg",
+ "jpm" => "image/jpm",
+ "jpr" => "application/x-jbuilder-project",
+ "jpx" => "image/jpx",
+ "js" => "application/javascript",
+ "k25" => "image/x-kodak-k25",
+ "kar" => "audio/midi",
+ "karbon" => "application/x-karbon",
+ "kcm" => "application/vnd.nervana",
+ "kdc" => "image/x-kodak-kdc",
+ "kdelnk" => "application/x-desktop",
+ "kfo" => "application/x-kformula",
+ "kia" => "application/vnd.kidspiration",
+ "kil" => "application/x-killustrator",
+ "kino" => "application/smil",
+ "kne" => "application/vnd.Kinar",
+ "knp" => "application/vnd.Kinar",
+ "kom" => "application/vnd.hbci",
+ "kon" => "application/x-kontour",
+ "kon" => "application/vnd.kde.kontour",
+ "kpm" => "application/x-kpovmodeler",
+ "kpr" => "application/x-kpresenter",
+ "kpt" => "application/x-kpresenter",
+ "kra" => "application/x-krita",
+ "ksp" => "application/x-kspread",
+ "kud" => "application/x-kugar",
+ "kwd" => "application/x-kword",
+ "kwt" => "application/x-kword",
+ "l16" => "audio/L16",
+ "la" => "application/x-shared-library-la",
+ "latex" => "text/x-tex",
+ "lbd" => "application/vnd.llamagraphics.life-balance.desktop",
+ "lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
+ "ldif" => "text/x-ldif",
+ "les" => "application/vnd.hhe.lesson-player",
+ "lha" => "application/x-lha",
+ "lhs" => "text/x-literate-haskell",
+ "lhz" => "application/x-lhz",
+ "log" => "text/x-log",
+ "lrm" => "application/vnd.ms-lrm",
+ "ltx" => "text/x-tex",
+ "lua" => "text/x-lua",
+ "lvp" => "audio/vnd.lucent.voice",
+ "lwo" => "image/x-lwo",
+ "lwob" => "image/x-lwo",
+ "lws" => "image/x-lws",
+ "lyx" => "application/x-lyx",
+ "lzh" => "application/x-lha",
+ "lzo" => "application/x-lzop",
+ "m" => "text/x-objcsrc",
+ "m15" => "audio/x-mod",
+ "m2t" => "video/mpeg",
+ "m3u" => "audio/x-mpegurl",
+ "m4" => "application/x-m4",
+ "m4a" => "audio/mp4",
+ "m4b" => "audio/x-m4b",
+ "m4u" => "video/vnd.mpegurl",
+ "m4v" => "video/mp4",
+ "mab" => "application/x-markaby",
+ "man" => "application/x-troff-man",
+ "mcd" => "application/vnd.mcd",
+ "md" => "application/x-genesis-rom",
+ "mdb" => "application/vnd.ms-access",
+ "mdi" => "image/vnd.ms-modi",
+ "me" => "text/x-troff-me",
+ "me" => "application/x-troff-me",
+ "mesh" => "model/mesh",
+ "mfm" => "application/vnd.mfmp",
+ "mgp" => "application/x-magicpoint",
+ "mid" => "audio/midi",
+ "midi" => "audio/midi",
+ "mif" => "application/x-mif",
+ "minipsf" => "audio/x-minipsf",
+ "mj2" => "video/MJ2",
+ "mjp2" => "video/MJ2",
+ "mka" => "audio/x-matroska",
+ "mkv" => "video/x-matroska",
+ "ml" => "text/x-ocaml",
+ "mli" => "text/x-ocaml",
+ "mm" => "text/x-troff-mm",
+ "mmf" => "application/vnd.smaf",
+ "mml" => "text/mathml",
+ "mng" => "video/x-mng",
+ "mo" => "application/x-gettext-translation",
+ "moc" => "text/x-moc",
+ "mod" => "audio/x-mod",
+ "moov" => "video/quicktime",
+ "mov" => "video/quicktime",
+ "movie" => "video/x-sgi-movie",
+ "\"mp+\"" => "audio/x-musepack",
+ "mp2" => "audio/mp2",
+ "mp2" => "video/mpeg",
+ "mp3" => "audio/mpeg",
+ "mp3g" => "video/mpeg",
+ "mp4" => "video/mp4",
+ "mpc" => "audio/x-musepack",
+ "mpe" => "video/mpeg",
+ "mpeg" => "video/mpeg",
+ "mpg" => "video/mpeg",
+ "mpga" => "audio/mpeg",
+ "mpm" => "application/vnd.blueice.multipass",
+ "mpn" => "application/vnd.mophun.application",
+ "mpp" => "application/vnd.ms-project",
+ "mrw" => "image/x-minolta-mrw",
+ "ms" => "text/x-troff-ms",
+ "mseq" => "application/vnd.mseq",
+ "msh" => "model/mesh",
+ "msod" => "image/x-msod",
+ "msx" => "application/x-msx-rom",
+ "mtm" => "audio/x-mod",
+ "mup" => "text/x-mup",
+ "mxmf" => "audio/vnd.nokia.mobile-xmf",
+ "mxu" => "video/vnd.mpegurl",
+ "n64" => "application/x-n64-rom",
+ "nb" => "application/mathematica",
+ "nc" => "application/x-netcdf",
+ "nds" => "application/x-nintendo-ds-rom",
+ "nef" => "image/x-nikon-nef",
+ "nes" => "application/x-nes-rom",
+ "nfo" => "text/x-readme",
+ "nim" => "video/vnd.nokia.interleaved-multimedia",
+ "not" => "text/x-mup",
+ "nsc" => "application/x-netshow-channel",
+ "nsv" => "video/x-nsv",
+ "o" => "application/x-object",
+ "obj" => "application/x-tgif",
+ "ocl" => "text/x-ocl",
+ "oda" => "application/oda",
+ "odb" => "application/vnd.oasis.opendocument.database",
+ "odc" => "application/vnd.oasis.opendocument.chart",
+ "odf" => "application/vnd.oasis.opendocument.formula",
+ "odg" => "application/vnd.oasis.opendocument.graphics",
+ "odi" => "application/vnd.oasis.opendocument.image",
+ "odm" => "application/vnd.oasis.opendocument.text-master",
+ "odp" => "application/vnd.oasis.opendocument.presentation",
+ "ods" => "application/vnd.oasis.opendocument.spreadsheet"<