diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-06-18 13:50:06 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-06-18 13:50:06 -0700 |
commit | cee9ca2bfd98b96cb8b956dd03fe03f313fee222 (patch) | |
tree | e5fdd5a68325a971b0d87c66bcd1ce693e1a4878 /lib/raindrops | |
parent | 963a7a144a5231f07da118cfe4fef0fb210f40c6 (diff) | |
download | raindrops-cee9ca2bfd98b96cb8b956dd03fe03f313fee222.tar.gz |
Rack webservers are not guaranteed to include Rack::Head in the middleware stack. Watcher is a standalone app, so it cannot rely on a framework which automatically includes Rack::Head.
Diffstat (limited to 'lib/raindrops')
-rw-r--r-- | lib/raindrops/watcher.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb index 5493374..43c30ef 100644 --- a/lib/raindrops/watcher.rb +++ b/lib/raindrops/watcher.rb @@ -143,8 +143,12 @@ class Raindrops::Watcher def call(env) @start.synchronize { @thr ||= aggregator_thread(env["rack.logger"]) } case env["REQUEST_METHOD"] - when "HEAD", "GET" + when "GET" get env + when "HEAD" + r = get(env) + r[2] = [] + r when "POST" post env else |