diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-11 16:36:08 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-11 16:36:08 -0800 |
commit | 9caff8ecc7912306366cebb9c57b65ab12fde5ad (patch) | |
tree | acba78e50083e9806c19197ea004f76443f7914d /t/write-on-close.ru | |
parent | 89f948aeaef34114ec61291ff8ffbebcf85a748e (diff) | |
download | rainbows-9caff8ecc7912306366cebb9c57b65ab12fde5ad.tar.gz |
We need to ensure this esoteric feature keeps working for some people.
Diffstat (limited to 't/write-on-close.ru')
-rw-r--r-- | t/write-on-close.ru | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/write-on-close.ru b/t/write-on-close.ru new file mode 100644 index 0000000..54a2f2e --- /dev/null +++ b/t/write-on-close.ru @@ -0,0 +1,11 @@ +class WriteOnClose + def each(&block) + @callback = block + end + + def close + @callback.call "7\r\nGoodbye\r\n0\r\n\r\n" + end +end +use Rack::ContentType, "text/plain" +run(lambda { |_| [ 200, [%w(Transfer-Encoding chunked)], WriteOnClose.new ] }) |