about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-04-11 22:57:53 +0000
committerEric Wong <normalperson@yhbt.net>2013-04-11 22:59:01 +0000
commitc29fd663b45888aa8661c8599c88c339f4fbe8c1 (patch)
treefe19804ae5aabf9de9b4e6565362ce8c4d6b85c1
parentd92a3a66adab040ca935c1b3aa0f5965b4cc1d67 (diff)
downloadraindrops-c29fd663b45888aa8661c8599c88c339f4fbe8c1.tar.gz
Relying on String#replace to set Content-Type stopped working
with rack commit 3623d04526b953a63bfb3e72de2d6920a042563f
This fixes compatibility with the Rack 1.5.x series.
-rw-r--r--lib/raindrops/watcher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb
index b7199a1..fb2df5b 100644
--- a/lib/raindrops/watcher.rb
+++ b/lib/raindrops/watcher.rb
@@ -323,7 +323,7 @@ class Raindrops::Watcher
     res = Rack::Response.new
     url = req.referer || "#{req.host_with_port}/"
     res.redirect(url)
-    res.content_type.replace "text/plain"
+    res["Content-Type"] = "text/plain"
     res.write "Redirecting to #{url}"
     res.finish
   end