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
tee_input: support for Rack::TempfileReaper middleware
[unicorn.git]
/
t
/
write-on-close.ru
blob
54a2f2e2cb131eb4af55f04df2aade285dbb6868
1
class WriteOnClose
2
def each(&block)
3
@callback = block
4
end
5
6
def close
7
@callback.call "7\r\nGoodbye\r\n0\r\n\r\n"
8
end
9
end
10
use Rack::ContentType, "text/plain"
11
run(lambda { |_| [ 200, [%w(Transfer-Encoding chunked)], WriteOnClose.new ] })