Sha256: 16636716e708a6a26265e3a5cdf32e401067837b2e1dbfae927b90325c83d768
Contents?: true
Size: 343 Bytes
Versions: 1
Compression:
Stored size: 343 Bytes
Contents
# lib-large-file-response will stop running if we're not on Linux here use Rack::ContentLength use Rack::ContentType map "/rss" do run lambda { |env| # on Linux, this is in kilobytes ::File.read("/proc/self/status") =~ /^VmRSS:\s+(\d+)/ [ 200, {}, [ ($1.to_i * 1024).to_s ] ] } end map "/" do run Rack::File.new(Dir.pwd) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rainbows-0.3.0 | t/large-file-response.ru |