!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.16 GB of 981.82 GB (22.73%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Deflater.html (22.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Class: Rack::Deflater

Files

Class/Module Index [+]

Quicksearch

Rack::Deflater

This middleware enables compression of http responses.

Currently supported compression algorithms:

* gzip
* deflate
* identity (no transformation)

The middleware automatically detects when compression is supported and allowed. For example no transformation is made when a cache directive of 'no-transform' is present, or when the response status code is one that doesn't allow an entity body.

Public Class Methods

new(app, options = {}) click to toggle source

Creates Rack::Deflater middleware.

app

rack app instance

options

hash of deflater options, i.e. 'if' - a lambda enabling / disabling deflation based on returned boolean value

e.g use Rack::Deflater, :if => lambda { |env, status, headers, body| body.length > 512 }

'include' - a list of content types that should be compressed

# File lib/rack/deflater.rb, line 27
def initialize(app, options = {})
  @app = app

  @condition = options[:if]
  @compressible_types = options[:include]
end

Public Instance Methods

call(env) click to toggle source
# File lib/rack/deflater.rb, line 34
def call(env)
  status, headers, body = @app.call(env)
  headers = Utils::HeaderHash.new(headers)

  unless should_deflate?(env, status, headers, body)
    return [status, headers, body]
  end

  request = Request.new(env)

  encoding = Utils.select_best_encoding(%(gzip deflate identity),
                                        request.accept_encoding)

  # Set the Vary HTTP header.
  vary = headers["Vary"].to_s.split(",").map { |v| v.strip }
  unless vary.include?("*") || vary.include?("Accept-Encoding")
    headers["Vary"] = vary.push("Accept-Encoding").join(",")
  end

  case encoding
  when "gzip"
    headers['Content-Encoding'] = "gzip"
    headers.delete(CONTENT_LENGTH)
    mtime = headers.key?("Last-Modified") ?
      Time.httpdate(headers["Last-Modified"]) : Time.now
    [status, headers, GzipStream.new(body, mtime)]
  when "deflate"
    headers['Content-Encoding'] = "deflate"
    headers.delete(CONTENT_LENGTH)
    [status, headers, DeflateStream.new(body)]
  when "identity"
    [status, headers, body]
  when nil
    message = "An acceptable encoding for the requested resource #{request.fullpath} could not be found."
    bp = Rack::BodyProxy.new([message]) { body.close if body.respond_to?(:close) }
    [406, {CONTENT_TYPE => "text/plain", CONTENT_LENGTH => message.length.to_s}, bp]
  end
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.0749 ]--