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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 
#\-N --debug
# frozen_string_literal: false
run(lambda do |env|
  case env['PATH_INFO']
  when '/vars'
    b = "debug=#{$DEBUG.inspect}\n" \
        "lint=#{caller.grep(%r{rack/lint\.rb})[0].split(':')[0]}\n"
  end
  h = {
    'content-length' => b.size.to_s,
    'content-type' => 'text/plain',
  }
  [ 200, h, [ b ] ]
end)

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