D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby19
/
lib64
/
ruby
/
gems
/
1.9.1
/
doc
/
rack-1.6.4
/
ri
/
Rack
/
Mime
/
Filename :
cdesc-Mime.ri
back
Copy
U:RDoc::NormalModule[iI" Mime:EFI"Rack::Mime;F0o:RDoc::Markup::Document:@parts[ : @file0[ [[I"MIME_TYPES;Fo;;[o:RDoc::Markup::Paragraph;[I"=List of most common mime-types, selected various sources;FI"Aaccording to their usefulness in a webserving scope for Ruby;FI"users.;Fo:RDoc::Markup::BlankLine o; ;[I"DTo amend this list with your local mime.types list you can use:;F@o:RDoc::Markup::Verbatim;[I"!require 'webrick/httputils' ;FI"Blist = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types') ;FI")Rack::Mime::MIME_TYPES.merge!(list) ;Fo; ;[I"ON.B. On Ubuntu the mime.types file does not include the leading period, so;FI"Dusers may need to modify the data before merging into the hash.;F@o; ;[I"+To add the list mongrel provides, use:;F@o;;[I" require 'mongrel/handlers' ;FI"CRack::Mime::MIME_TYPES.merge!(Mongrel::DirHandler::MIME_TYPES);F; 0I"lib/rack/mime.rb;F[ [[I" class;F[[:public[[I"match?;F@*[I"mime_type;F@*[:protected[ [:private[ [I" instance;F[[; [ [;[ [;[