Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jun 11, 2010
  1. @manveru
Commits on Jun 9, 2010
  1. @manveru
Commits on Jun 8, 2010
  1. @manveru
Commits on Dec 22, 2009
  1. @rtomayko

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

    rtomayko authored
    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.
Commits on Dec 21, 2009
  1. @josh

    Extract parse_query and parse_multipart in Request so subclasses

    josh authored
    can change their behavior [#71 state:resolved]
  2. @josh
  3. @josh

    Request#user_agent

    josh authored
Commits on Dec 11, 2009
  1. @josh

    rack.logger specification

    josh authored
Commits on Aug 5, 2009
  1. @josh

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

    josh authored
    This reverts commit 6ae0a10.
Commits on Aug 3, 2009
  1. @josh
  2. @josh
Commits on May 15, 2009
  1. @jeremy @josh

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

    jeremy authored josh committed
    …ng the uninitialized rack.request.form_hash
    
    Signed-off-by: Joshua Peek <josh@joshpeek.com>
Commits on May 11, 2009
  1. @josh

    Kill request instance memoization

    josh authored
Commits on Apr 19, 2009
  1. @josh
  2. @josh

    Add 'rack.session' specification

    josh authored
Commits on Apr 14, 2009
  1. @FooBarWidget

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

    FooBarWidget authored
    …ewindable, because rack.input is now required to be rewindable.
Commits on Apr 11, 2009
  1. @chneukirchen

    better multipart handling

    eTM authored chneukirchen committed
Commits on Mar 31, 2009
  1. @manveru
Commits on Mar 19, 2009
  1. @tj @chneukirchen

    Added Rack::Request#path

    tj authored chneukirchen committed
    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 <chneukirchen@gmail.com>
  2. @tj @chneukirchen

    Refactored Rack::Request#media_type

    tj authored chneukirchen committed
    No need for subscript, first reads better
    
    Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
Commits on Feb 15, 2009
  1. @josh

    Split parse_query utility into parse_query and parse_nested_query. pa…

    josh authored
    …rse_nested_query now chooses the last value instead of returning an array of all of them.
Commits on Feb 1, 2009
  1. @josh
Commits on Jan 21, 2009
  1. @josh

    Clean up Safari's ajax POST body

    josh authored
Commits on Jan 14, 2009
  1. @josh

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

    josh authored
    …o rewind the input stream.
Commits on Dec 29, 2008
  1. @josh

    Don't try to rewind CGI input

    josh authored
Commits on Dec 25, 2008
  1. @chneukirchen

    Idiomize code

    chneukirchen authored
  2. @mtodd
Commits on Dec 24, 2008
  1. @josh
Commits on Nov 28, 2008
  1. @chneukirchen

    Avoid slurping or parsing request body on PUT requests

    Eric Wong authored chneukirchen committed
    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.
Commits on Aug 30, 2008
  1. @manveru @chneukirchen

    Add Request#ip and corresponding spec

    manveru authored chneukirchen committed
Commits on Jul 6, 2008
  1. @qerub @chneukirchen

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

    qerub authored chneukirchen committed
    …ils.select_best_encoding)
Commits on Apr 10, 2008
  1. @chneukirchen

    handle EOFError exception in Request#params

    chneukirchen authored
    darcs-hash:20080410202632-0c10b-e89c6619864024b884e6f85cda0a4e13f6f176fa.gz
Commits on Mar 27, 2008
  1. Bug fix for Tempfile POST bodies under Ruby 1.8

    Adam Harper authored
    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
    implementation.)
    
    darcs-hash:20080327110953-ea3b8-44b6f22da80c9dae70dcd61adc43111547371daf.gz
Commits on Mar 15, 2008
  1. @chneukirchen

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

    chneukirchen authored
    Fixes cases where accessing Request#params causes the body to be read and
    processed as form-data improperly. For example, consider the following
    request:
    
        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
    specified.
    
    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.
    
    darcs-hash:20080315135144-8bfab-f12391851f188ab1467b7e3d825f1e196058210d.gz
Commits on Feb 24, 2008
  1. @chneukirchen

    Fix cookie parsing

    chneukirchen authored
    darcs-hash:20080224184600-4fc50-a0c322c967df89d53bc73aa5c581df08a6f99339.gz
Something went wrong with that request. Please try again.