unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
blob 2ae58a82e8cbaa5fa5f9f0c42a96499905810b2e 379 bytes (raw)
$ git show HEAD:t/oob_gc.ru	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
#\-E none
# frozen_string_literal: false
require 'unicorn/oob_gc'
use Rack::ContentLength
use Rack::ContentType, "text/plain"
use Unicorn::OobGC
$gc_started = false

# Mock GC.start
def GC.start
  $gc_started = true
end
run lambda { |env|
  if "/gc_reset" == env["PATH_INFO"] && "POST" == env["REQUEST_METHOD"]
    $gc_started = false
  end
  [ 200, {}, [ "#$gc_started\n" ] ]
}

git clone https://yhbt.net/unicorn.git