diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-17 22:42:55 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-17 22:42:55 -0700 |
commit | 031127b1d047d05be7a2ec8af7480d02e9bbdd69 (patch) | |
tree | 991ab52014238496bec00005c69c2089e735866f | |
parent | 7a3ebef424f3e7db0a48ae35885c446d79b7d971 (diff) | |
download | rainbows-031127b1d047d05be7a2ec8af7480d02e9bbdd69.tar.gz |
-rw-r--r-- | t/sleep.ru | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,7 +1,8 @@ use Rack::ContentLength -use Rack::ContentType run lambda { |env| + /\A100-continue\z/i =~ env['HTTP_EXPECT'] and return [ 100, {}, [] ] + nr = 1 env["PATH_INFO"] =~ %r{/([\d\.]+)\z} and nr = $1.to_f @@ -12,5 +13,5 @@ run lambda { |env| Kernel end).sleep(nr) - [ 200, {}, [ "Hello\n" ] ] + [ 200, {'Content-Type' => 'text/plain'}, [ "Hello\n" ] ] } |