Module: Mongrel::Const

### Home Classes Methods

### In Files

- lib/mongrel/const.rb

### Files

- CHANGELOG
- COPYING
- LICENSE
- README
- Makefile

### Class/Module Index

Quicksearch

- Mongrel
- Mongrel::CGIWrapper
- Mongrel::Camping
- Mongrel::Camping::CampingHandler
- Mongrel::Command
- Mongrel::Command::Base
- Mongrel::Command::Registry
- Mongrel::Configurator
- Mongrel::Const
- Mongrel::DeflateFilter
- Mongrel::DirHandler
- Mongrel::Error404Handler
- Mongrel::Gems
- Mongrel::HeaderOut
- Mongrel::HttpHandler
- Mongrel::HttpHandlerPlugin
- Mongrel::HttpParams
- Mongrel::HttpParser
- Mongrel::HttpParserError
- Mongrel::HttpRequest
- Mongrel::HttpResponse
- Mongrel::HttpServer
- Mongrel::Rails
- Mongrel::Rails::RailsConfigurator
- Mongrel::Rails::RailsHandler
- Mongrel::RedirectHandler
- Mongrel::StatisticsFilter
- Mongrel::Stats
- Mongrel::StatusHandler
- Mongrel::StopServer
- Mongrel::TimeoutError
- Mongrel::URIClassifier
- Mongrel::URIClassifier::RegistrationError
- Mongrel::URIClassifier::UsageError
- RequestLog
- RequestLog::Access
- RequestLog::Files
- RequestLog::Objects
- RequestLog::Params
- RequestLog::Threads
- IO
- Kernel
- MongrelDbg
- TCPServer

No matching classes.

# Mongrel::Const

Frequently used constants when constructing requests or responses. Many times the constant just refers to a string with the same contents. Using these constants gave about a 3% to 10% performance improvement over using the strings directly. Symbols did not really improve things much compared to constants.

While Mongrel does try to emulate the CGI/1.2 protocol, it does not use the REMOTE_IDENT, REMOTE_USER, or REMOTE_HOST parameters since those are either a security problem or too taxing on performance.

### Constants

CHUNK_SIZE

  The basic max request size we'll try to read.

CONTENT_LENGTH
CONTENT_TYPE
DATE
ERROR_404_RESPONSE

  The standard empty 404 response for bad requests. Use Error4040Handler for custom stuff.

ERROR_503_RESPONSE

  A common header for indicating the server is too busy. Not used yet.

ETAG
ETAG_FORMAT

  ETag is based on the apache standard of hex mtime-size-inode (inode is 0 on win32)

GET
HEAD
HEADER_FORMAT
HOST
HTTP_IF_MODIFIED_SINCE
HTTP_IF_NONE_MATCH
HTTP_X_FORWARDED_FOR
LAST_MODIFIED
LINE_END
MAX_BODY

  Maximum request body size before it is moved out of memory and into a tempfile for reading.

MAX_HEADER

  This is the maximum header that is allowed before a client is booted. The parser detects this, but we'd also like to do this as well.

MONGREL_TMP_BASE
MONGREL_VERSION
PATH_INFO

  This is the part of the path after the SCRIPT_NAME. URIClassifier will determine this.

REDIRECT
REMOTE_ADDR
REQUEST_METHOD
REQUEST_PATH
REQUEST_URI

  The original URI requested by the client. Passed to URIClassifier to build PATH_INFO and SCRIPT_NAME.

SCRIPT_NAME

  This is the initial part that your handler is identified as by URIClassifier.

SLASH
STATUS_FORMAT

  A frozen format for this is about 15% faster

[Validate]

Generated with the Darkfish Rdoc Generator 2.