Sha256: 0e81ca9eebf7e8dd4c7f768b544130f5f0a8ba4b5fdef6bee914c861522b3549
Contents?: true
Size: 583 Bytes
Versions: 13
Compression:
Stored size: 583 Bytes
Contents
# -*- encoding: binary -*- # Copyright (C) 2009-2013, Eric Wong <normalperson@yhbt.net> et. al. # License: GPLv2 or later (https://www.gnu.org/licenses/gpl-2.0.txt) # This is used as the @input/env["rack.input"] when # input_buffering == true or :lazy class Yahns::CapInput < Yahns::TmpIO # :nodoc: attr_writer :bytes_left def self.new(limit, tmpdir) rv = super(tmpdir) rv.bytes_left = limit rv end def write(buf) if (@bytes_left -= buf.size) < 0 raise Unicorn::RequestEntityTooLargeError, "chunked body too big", [] end super(buf) end end
Version data entries
13 entries across 13 versions & 1 rubygems