1 # lib-large-file-response will stop running if we're not on Linux here
2 use Rack::ContentLength
6 # on Linux, this is in kilobytes
7 GC.start if GC.respond_to?(:start)
8 ::File.read("/proc/self/status") =~ /^VmRSS:\s+(\d+)/
9 [ 200, {}, [ ($1.to_i * 1024).to_s ] ]
13 run Rack::File.new(Dir.pwd)