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


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

Files

Class/Module Index [+]

Quicksearch

Rack::Response

Rack::Response provides a convenient interface to create a Rack response.

It allows setting of headers and cookies, and provides useful defaults (a OK response containing HTML).

You can use Response#write to iteratively generate your response, but note that this is buffered by Rack::Response until you call finish. finish however can take a block inside which calls to write are synchronous with the Rack response.

Your application's call should end returning Response#finish.

Attributes

body[RW]
header[R]
headers[R]
length[RW]
status[RW]

Public Class Methods

new(body=[], status=200, header={}) click to toggle source
# File lib/rack/response.rb, line 25
def initialize(body=[], status=200, header={})
  @status = status.to_i
  @header = Utils::HeaderHash.new.merge(header)

  @chunked = CHUNKED == @header[TRANSFER_ENCODING]
  @writer  = lambda { |x| @body << x }
  @block   = nil
  @length  = 0

  @body = []

  if body.respond_to? :to_str
    write body.to_str
  elsif body.respond_to?(:each)
    body.each { |part|
      write part.to_s
    }
  else
    raise TypeError, "stringable or iterable required"
  end

  yield self  if block_given?
end

Public Instance Methods

[](key) click to toggle source
# File lib/rack/response.rb, line 52
def [](key)
  header[key]
end
[]=(key, value) click to toggle source
# File lib/rack/response.rb, line 56
def []=(key, value)
  header[key] = value
end
close() click to toggle source
# File lib/rack/response.rb, line 107
def close
  body.close if body.respond_to?(:close)
end
each(&callback) click to toggle source
# File lib/rack/response.rb, line 88
def each(&callback)
  @body.each(&callback)
  @writer = callback
  @block.call(self)  if @block
end
empty?() click to toggle source
# File lib/rack/response.rb, line 111
def empty?
  @block == nil && @body.empty?
end
finish(&block) click to toggle source
# File lib/rack/response.rb, line 73
def finish(&block)
  @block = block

  if [204, 205, 304].include?(status.to_i)
    header.delete CONTENT_TYPE
    header.delete CONTENT_LENGTH
    close
    [status.to_i, header, []]
  else
    [status.to_i, header, BodyProxy.new(self){}]
  end
end
Also aliased as: to_a, to_ary
redirect(target, status=302) click to toggle source
# File lib/rack/response.rb, line 68
def redirect(target, status=302)
  self.status = status
  self["Location"] = target
end
to_a(&block) click to toggle source
Alias for: finish
to_ary(&block) click to toggle source
Alias for: finish
write(str) click to toggle source

Append to body and update Content-Length.

NOTE: Do not mix write and direct body access!

# File lib/rack/response.rb, line 98
def write(str)
  s = str.to_s
  @length += Rack::Utils.bytesize(s) unless @chunked
  @writer.call s

  header[CONTENT_LENGTH] = @length.to_s unless @chunked
  str
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.1653 ]--