Skip to content
This repository

Jun 11, 2010

  1. Michael Fellinger

    Add Request.trace? and Request.options?

    manveru authored

Jun 09, 2010

  1. Michael Fellinger

    Don't use 'unknown' in HTTP_X_FORWARDED_FOR

    manveru authored

Jun 08, 2010

  1. Michael Fellinger

    The correct IP from HTTP_X_FORWARDED_FOR is the first one

    manveru authored

Dec 22, 2009

  1. Ryan Tomayko

    Use Content-Type to determine POST params parsing [#20]

    Reverts the hard test for a 'PUT' request method (8d01dc0) and
    uses the Content-Type to determine whether to read into the
    request body. The Request#POST method parses the request body
    if (and only if) either of the following conditions are met:
    1. The request's Content-Type is application/x-www-form-urlencoded
       or multipart/form-data. Note: the REQUEST_METHOD is ignored in
       this case.
    2. The original REQUEST_METHOD is 'POST' and no Content-Type header
       was specified in the request. Note that we use the REQUEST_METHOD
       value before any modifications by the MethodOverride middleware.
    This is very similar to how this worked prior to 8d01dc0 but
    narrows the 'no Content-Type' special case to apply only to
    POST requests. A PUT request with no Content-Type header would
    trigger parsing before - with this change only POST requests
    with no Content-Type trigger parsing.
    rtomayko authored

Dec 21, 2009

  1. Joshua Peek

    Extract parse_query and parse_multipart in Request so subclasses

    can change their behavior [#71 state:resolved]
    josh authored
  2. Joshua Peek

    Request#host knows about forwared host [#77 state:resolved]

    josh authored
  3. Joshua Peek


    josh authored

Dec 11, 2009

  1. Joshua Peek

    rack.logger specification

    josh authored

Aug 05, 2009

  1. Joshua Peek

    Revert "Add common HTTP strings to Rack::Const"

    This reverts commit 6ae0a10.
    josh authored

Aug 03, 2009

  1. Joshua Peek

    Add common HTTP strings to Rack::Const

    josh authored
  2. Joshua Peek

    Return an empty string for Request#host if HTTP_HOST and SERVER_NAME …

    …are both missing
    josh authored

May 15, 2009

  1. Jeremy Kemper

    Rack::Request#POST raises if rack.input is missing instead of returni…

    …ng the uninitialized rack.request.form_hash
    Signed-off-by: Joshua Peek <>
    jeremy authored josh committed

May 11, 2009

  1. Joshua Peek

    Kill request instance memoization

    josh authored

Apr 19, 2009

  1. Joshua Peek

    Merge commit 'FooBarWidget/master'

    josh authored
  2. Joshua Peek

    Add 'rack.session' specification

    josh authored

Apr 14, 2009

  1. Hongli Lai

    Remove code for handling the possibility that rack.input may not be r…

    …ewindable, because rack.input is now required to be rewindable.

Apr 11, 2009

  1. better multipart handling

    eTM authored chneukirchen committed

Mar 31, 2009

  1. Michael Fellinger

    Allow arbitrary number of arguments for Request::new

    manveru authored

Mar 19, 2009

  1. TJ Holowaychuk

    Added Rack::Request#path

    I would imagine since its used internally there is a chance other devs will
    need it, and IMO its a mise-well situation, your call :)
    Signed-off-by: Christian Neukirchen <>
    visionmedia authored chneukirchen committed
  2. TJ Holowaychuk

    Refactored Rack::Request#media_type

    No need for subscript, first reads better
    Signed-off-by: Christian Neukirchen <>
    visionmedia authored chneukirchen committed

Feb 15, 2009

  1. Joshua Peek

    Split parse_query utility into parse_query and parse_nested_query. pa…

    …rse_nested_query now chooses the last value instead of returning an array of all of them.
    josh authored

Feb 01, 2009

  1. Joshua Peek

    Fix Rack::Request subclassing and memoization issues

    josh authored

Jan 21, 2009

  1. Joshua Peek

    Clean up Safari's ajax POST body

    josh authored

Jan 14, 2009

  1. Joshua Peek

    Add tests for multipart uploads. Also ensure multipart parser tries t…

    …o rewind the input stream.
    josh authored

Dec 29, 2008

  1. Joshua Peek

    Don't try to rewind CGI input

    josh authored

Dec 25, 2008

  1. Christian Neukirchen

    Idiomize code

    chneukirchen authored
  2. Matt Todd

    Added Rack::Request initialization memoization to reduce repetitive i…

    …nstantiation cost.
    mtodd authored

Dec 24, 2008

  1. Joshua Peek

    Rewind input after parsing request form vars

    josh authored

Nov 28, 2008

  1. Avoid slurping or parsing request body on PUT requests

    Uploading a large file via the HTTP PUT method causes
    `@env["rack.input"].read' to be called inside the POST method.  This
    means the entire file is slurped into memory and was needlessly causing
    my Sinatra process to eat up 300M+ for some uploads I've been doing.
    Eric Wong authored chneukirchen committed

Aug 30, 2008

  1. Michael Fellinger

    Add Request#ip and corresponding spec

    manveru authored chneukirchen committed

Jul 06, 2008

  1. Christoffer Sawicki

    Added support for Accept-Encoding (via Request#accept_encoding and Ut…

    qerub authored chneukirchen committed

Apr 10, 2008

  1. Christian Neukirchen

    handle EOFError exception in Request#params

    chneukirchen authored

Mar 27, 2008

  1. Bug fix for Tempfile POST bodies under Ruby 1.8

    The Tempfile class in Ruby 1.8 doesn't implement the == method correctly.
    This causes Rack::Requests to re-parse the input (when the input is a
    Tempfile) each time the POST method is called, this in turn raises an
    EOFError because the input has already been read.
    One example of when this happens is when handling large POST requests
    (e.g. file uploads) under Mongrel.
    This issue only effects Ruby 1.8 (tested against 1.8.6).  Ruby 1.9 does
    not suffer from this issue (presumably due to changes in the Delegate
    Adam Harper authored

Mar 15, 2008

  1. Christian Neukirchen

    Fix that Request assumes form-data even when Content-Type says otherwise

    Fixes cases where accessing Request#params causes the body to be read and
    processed as form-data improperly. For example, consider the following
        PUT /foo/bar?baz=bizzle HTTP/1.1
        Content-Type: text/plain
        This is not form-data.
    When Rack::Request gets ahold of the corresponding environment, and the
    application attempts to access the "baz" query string param, the body is read
    and interpreted as form-data. If the body is an IOish object, this causes the
    offset to be forwarded to the end of file.
    The patch prevents the Request#POST method from going into the body unless the
    media type is application/x-www-form-urlencoded, multipart/form-data, or not
    While here, added a few unrelated helper methods to Request that I've found
    particularly useful in Rack apps: #content_length, #head?, and #content_charset.
    Tests and doc included for all changes.
    chneukirchen authored

Feb 24, 2008

  1. Christian Neukirchen

    Fix cookie parsing

    chneukirchen authored
Something went wrong with that request. Please try again.