Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Apr 6, 2015
  1. @spastorino
  2. @spastorino

    Merge pull request #781 from Nyoho/fix-separator-semicolon-GET

    spastorino authored
    Fix semicolons as separators for GET
Commits on Mar 11, 2015
  1. @spastorino

    Merge pull request #814 from johnnaegle/only_increment_open_file_coun…

    spastorino authored
    …t_for_fileparts
    
    Only count files (not all form elements) against the Multipart File Limit
Commits on Mar 9, 2015
  1. @johnnaegle

    Only increment the opened_files counter for file inputs. If you have a

    johnnaegle authored
    large form with only one file, you can quickly hit the MultipartPartLimitError
    Add test for not hitting the multipart limit
  2. @spastorino

    Merge pull request #819 from eileencodes/expand-initalize-ivars

    spastorino authored
    Expand initialize ivars instead of using 1 line
Commits on Mar 6, 2015
  1. @eileencodes

    Expand initialize ivars instead of using 1 line

    eileencodes authored
    Flattening the ivars here causes them to be allocated as an array.
    This commit expands them to avoid these extra allocations.
    
    Total allocations before: 2913000
    Total allocations after:  2892000
Commits on Mar 5, 2015
  1. @tenderlove

    Merge pull request #798 from smcgivern/option_order

    tenderlove authored
    Prioritise CLI options over comment options
  2. @tenderlove

    Merge pull request #810 from DamirSvrtan/yield_instead_of_block_call

    tenderlove authored
    Use yield instead of block.call
  3. @tenderlove

    Merge pull request #816 from english/fix-multipart-noname

    tenderlove authored
    Handle mulipart requests with no part names
  4. @jeremy

    Revert "Merge pull request #813 from eileencodes/remove-check-for-nil"

    jeremy authored
    Add a test demonstrating that `nil` is treated as an empty query string
    
    This reverts commit 7788a1b, reversing
    changes made to e117591.
Commits on Mar 4, 2015
  1. @english

    Handle mulipart/... requests with no part names

    english authored
    Previously, Rack would assume there would be either a Content-Disposition or Content-ID
    header for multipart request parts. This is not required in [rfc1341][0].
    
    Now, Rack will use the Content-Type (falling back to text/plain) for the part name,
    storing parameters in an array, keyed off the content type.
    
    [0]: http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
Commits on Mar 1, 2015
  1. @spastorino

    Merge pull request #809 from tgxworld/reduce_allocations

    spastorino authored
    Reduce allocations
  2. @DamirSvrtan
  3. @eileencodes

    Remove check for `nil` on `qs`

    eileencodes authored
    Fixed by brynary/rack-test@4a4b2c1. rack-test was turning the query
    string to nil if there was no argument passed in the params. This extra
    `nil` check is no longer necessary after the changes made to the
    rack-test gem. Fixes issue brought up in #800.
Commits on Feb 27, 2015
  1. @DamirSvrtan
Commits on Feb 25, 2015
  1. @tgxworld

    Prefer String concatenation.

    tgxworld authored
    Before:
    ```
    [["rack/lib/rack/utils.rb", 280, :T_STRING], [12004, 0, 11304, 0, 1, 463840]]
    ```
    
    After:
    ```
    [["rack/lib/rack/utils.rb", 280, :T_STRING], [5996, 0, 5706, 0, 2, 232320]]
    ```
  2. @tgxworld

    Reduce String allocations by storing common seperators in a constant.

    tgxworld authored
    Before:
    ```
    [["rack/lib/rack/utils.rb", 87, :T_STRING], [111173, 57, 106670, 0, 27, 12654156]]
    [["rack/lib/rack/utils.rb", 115, :T_STRING], [30244, 58, 29580, 0, 27, 3275248]]
    ```
    
    After:
    ```
    [["rack/lib/rack/utils.rb", 88, :T_STRING], [20979, 136, 21178, 0, 27, 1677320]]
    [["rack/lib/rack/utils.rb", 116, :T_STRING], [8995, 137, 9943, 0, 27, 581392]]
    ```
  3. @tgxworld

    Reduce Array allocations.

    tgxworld authored
    Before
    ```
    [["rack/lib/rack/utils.rb", 116, :T_ARRAY], [11988, 0, 11663, 0, 2, 463840]]
    ```
    
    After
    ```
    [["rack/lib/rack/utils.rb", 116, :T_ARRAY], [6002, 0, 5624, 0, 2, 232640]]
    ```
  4. @tgxworld

    Reduce String allocations.

    tgxworld authored
    Before:
    ```
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [41986, 0, 40154, 0, 2, 1627920]]
    [["rack/lib/rack/utils.rb", 116, :T_STRING], [17982, 0, 17490, 0, 2, 695760]]
    ```
    
    After:
    ```
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [27000, 0, 25875, 0, 1, 1046880]]
    [["rack/lib/rack/utils.rb", 116, :T_STRING], [12000, 0, 11283, 0, 2, 465120]]
    ```
Commits on Feb 19, 2015
  1. @tenderlove

    Merge branch 'master' into soulim-even-less-objects

    tenderlove authored
    * master: (53 commits)
      Update documentation of Rack::Response defaults
      Reduce string allocations.
      Clean up `@names` hash
      Don't pass arguments to `#each`
      Freeze 'X-Runtime' string
      Reduce object allocation.
      Fix bug when `qs` is `nil`
      Update license with up-to-date year
      Use default bundle install command.
      Reduce object allocations in Rack::Utils
      add office related Mime type
      fix typo
      Remove whitespaces
      Add woff2 mime type
      Update head.rb
      Fix spec versions in all handler files
      Run all the tests on ci, we have the pkgs
      Oh look, no one has run fulltest for so long
      did you know you could use turtles to shave yaks?
      Update travis.yml since we added bundler and stuff
      ...
    
    Conflicts:
    	lib/rack/file.rb
  2. @tenderlove

    Merge pull request #794 from jakimowicz/add_office_extensions

    tenderlove authored
    add office related Mime type
  3. @tenderlove
  4. @tenderlove

    Merge pull request #802 from eileencodes/freeze-x-runtime-strings-to-…

    tenderlove authored
    …reduce-allocations
    
    Freeze 'X-Runtime' string
  5. @tenderlove

    Merge pull request #803 from eileencodes/dont-pass-arguments-to-each

    tenderlove authored
    Don't pass arguments to `#each`
  6. @tenderlove
  7. @tenderlove

    Merge pull request #801 from tgxworld/reduce_object_allocation

    tenderlove authored
    Reduce object allocation.
  8. @tenderlove

    Merge pull request #805 from tgxworld/reduce_string_allocations

    tenderlove authored
    Reduce string allocations.
  9. @tomstuart

    Update documentation of Rack::Response defaults

    tomstuart authored
    The “containing HTML” remark stopped being true in 3623d04, as reflected by https://github.com/rack/rack/blob/master/test/spec_response.rb#L5-L21.
  10. @tgxworld

    Reduce string allocations.

    tgxworld authored
    Before total allocations = 69010
    ```
    [[rack/lib/rack/utils.rb", 314, :T_STRING], [39000, 22, 38009, 0, 27, 2536600]]
    [[rack/lib/rack/utils.rb", 312, :T_STRING], [12004, 0, 11518, 0, 2, 464800]]
    [[rack/lib/rack/utils.rb", 313, :T_STRING], [18006, 0, 17274, 0, 1, 2803325]]
    ```
    
    After total allocations = 45000
    ```
    [[rack/lib/rack/utils.rb", 315, :T_STRING], [45000, 41, 45338, 0, 28, 4160731]]
    ```
Commits on Feb 18, 2015
  1. @eileencodes

    Clean up `@names` hash

    eileencodes authored
    Tidies up the `@names` hash so we don't need to store as much in it.
  2. @eileencodes

    Don't pass arguments to `#each`

    eileencodes authored
    Nothing is actually passed to `#each` so we shouldn't be passing `*args`.
    This change eliminates proc and array allocations here.
    
    Before this change `#each` on rack/lib/rack/body_proxy.rb:34 was number
    3 in highest allocations for Rails integration tests. After this change it's
    no longer in the top 5.
  3. @eileencodes

    Freeze 'X-Runtime' string

    eileencodes authored
    Move 'X-Runtime' to a constant and freeze. Combine with other
    `FORMAT_STRING` constant used in the class.
    
    We are freezing these strings to reduce the number of allocations in
    Rails integration tests. The tests are spending a lot of time in GC and
    this reduces the amount of time spent from 12% to 9% (in combination
    with Rails PR that also freezes some strings).
    
    Strings allocated before this change: 1030722
    Strings allocated after this change: 1024722
  4. @tgxworld

    Reduce object allocation.

    tgxworld authored
    Before:
    ```
    [[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113158, 342, 114877, 0, 28, 5989110]]
    [["rack/lib/rack/utils.rb", 87, :T_STRING], [110615, 57, 108492, 0, 28, 12576892]]
    [["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59564, 0, 58024, 0, 1, 2304160]]
    [["rack/lib/rack/utils.rb", 89, :T_ARRAY], [56601, 0, 55128, 0, 2, 2189560]]
    [["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54652, 0, 53229, 0, 2, 5830250]]
    [["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53606, 0, 52222, 0, 1, 2073520]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50621, 16, 49447, 0, 22, 8126520]]
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [41706, 0, 40620, 0, 2, 1613360]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [41694, 0, 40618, 0, 1, 4676888]]
    [["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [41690, 0, 40612, 0, 1, 1612560]]
    ```
    After:
    ```
    [[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113994, 348, 116830, 0, 28, 6032912]]
    [["rack/lib/rack/utils.rb", 87, :T_STRING], [111363, 58, 110247, 0, 28, 12668100]]
    [["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59996, 0, 58968, 0, 1, 2321120]]
    [["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54964, 0, 54050, 0, 1, 5870020]]
    [["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53990, 0, 53070, 0, 1, 2088880]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50989, 11, 50231, 0, 25, 8188064]]
    [["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [42006, 0, 41282, 0, 1, 1624960]]
    [["rack/lib/rack/utils.rb", 89, :T_ARRAY], [42002, 0, 41278, 0, 2, 1624880]]
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [42002, 0, 41279, 0, 2, 1624880]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [42000, 0, 41286, 0, 1, 4712384]]
    ```
Commits on Feb 17, 2015
  1. @eileencodes

    Fix bug when `qs` is `nil`

    eileencodes authored
    In c4596b3 I failed to test Rails tests and in working on other issues
    discovered some Rails ActionPack tests weren't erroring. I found that
    sometimes `qs` is nil so I changed this to check for `qs.nil? || qs.empty?`.
Commits on Feb 15, 2015
  1. @smcgivern

    Prioritise CLI options over comment options

    smcgivern authored
    There are four sources of options for `Rack::Server`:
    
    1. In the constructor, as a hash: `Rack::Server.new(server: 'thin')`
    2. On the command line: `bundle exec rackup --server thin`
    3. In a magic comment on the first line of config.ru (or whichever
       config file was used): `#\ --server thin`
    4. `Rack::Server#default_options`
    
    If 1 is provided, 4 and 2 won't be used. Previously, the order of
    precedence - earlier 'wins' - was either:
    
    * 1, 3
    * 3, 2, 4
    
    This changes the latter to 2, 3, 4. This allows an app to specify a
    default port in the magic comment, but for that to be changed when using
    the `rackup` script.
Something went wrong with that request. Please try again.