Class Thin::Request
In: lib/thin/request.rb
Parent: Object

A request sent by the client to the server.

Methods

Constants

MAX_BODY = 1024 * (80 + 32)   Maximum request body size before it is moved out of memory and into a tempfile for reading.
BODY_TMPFILE = 'thin-body'.freeze
MAX_HEADER = 1024 * (80 + 32)
SERVER_SOFTWARE = 'SERVER_SOFTWARE'.freeze   Freeze some HTTP header names & values
HTTP_VERSION = 'HTTP_VERSION'.freeze
HTTP_1_0 = 'HTTP/1.0'.freeze
REMOTE_ADDR = 'REMOTE_ADDR'.freeze
FORWARDED_FOR = 'HTTP_X_FORWARDED_FOR'.freeze
CONTENT_LENGTH = 'CONTENT_LENGTH'.freeze
CONNECTION = 'HTTP_CONNECTION'.freeze
KEEP_ALIVE_REGEXP = /keep-alive/i
NOT_CLOSE_REGEXP = /[^(close)]/i
RACK_INPUT = 'rack.input'.freeze   Freeze some Rack header names
RACK_VERSION = 'rack.version'.freeze
RACK_ERRORS = 'rack.errors'.freeze
RACK_MULTITHREAD = 'rack.multithread'.freeze
RACK_MULTIPROCESS = 'rack.multiprocess'.freeze
RACK_RUN_ONCE = 'rack.run_once'.freeze

Attributes

body  [R]  Request body
data  [R]  Unparsed data of the request
env  [R]  CGI-like request environment variables

Public Class methods

Public Instance methods

Close any resource used by the request

Expected size of the body

true if headers and body are finished parsing

Parse a chunk of data into the request environment Raises a InvalidRequest if invalid. Returns true if the parsing is complete.

Returns true if the client expect the connection to be persistent.

[Validate]