about summary refs log tree commit homepage
path: root/lib/yahns/max_body/wrapper.rb
DateCommit message (Collapse)
2016-01-04use String#clear for short-lived buffers we create
This should reduce memory pressure slightly as we can have finer-grained control of memory usage for buffers which can be several kilobytes large. It is not safe to do this for output buffers we get from the application, as they may reuse that memory themselves.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright We're also switching to 'GPL-3.0+' as recommended by SPDX to be consistent with our gemspec and other metadata (as opposed to the longer but equivalent "GPLv3 or later"). [1] git://git.savannah.gnu.org/gnulib.git
2016-01-02enable frozen_string_literal for Ruby 2.3+
There are likely yet-to-be-discovered bugs in here. Also, keeping explicit #freeze calls for 2.2 users, since most users have not migrated to 2.3, yet.
2015-10-13copyright updates
Future updates may use the update-copyright script in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2013-10-19wire up client_max_body_size limits
This is mostly code imported from Rainbows! (so GPLv2+). This should implement everything necessary to prevent clients from DoS-ing us with overly large bodies. The default is 1M (same as Rainbows! and nginx). Yahns::MaxBody may become part of the public API (as the equivalent is in Rainbows!), since it makes more sense in the rackup (config.ru) file (since it's endpoint-specific). However, that's confusing as Yahns::MaxBody only works when input_buffering is :lazy or false, and not when it is true (preread).