repo.or.cz
/
unicorn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
http_request: support rack.hijack by default
[unicorn.git]
/
t
/
t0116.ru
blob
fab5fce1d6d8123882788357d985c6b25ee1174c
1
#\ -E none
2
use Rack::ContentLength
3
use Rack::ContentType, 'text/plain'
4
app = lambda do |env|
5
input = env['rack.input']
6
case env["PATH_INFO"]
7
when "/tmp_class"
8
body = input.instance_variable_get(:@tmp).class.name
9
when "/input_class"
10
body = input.class.name
11
else
12
return [ 500, {}, [] ]
13
end
14
[ 200, {}, [ body ] ]
15
end
16
run app