From c29fd663b45888aa8661c8599c88c339f4fbe8c1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 11 Apr 2013 22:57:53 +0000 Subject: [PATCH] watcher: set Content-Type via assignment Relying on String#replace to set Content-Type stopped working with rack commit 3623d04526b953a63bfb3e72de2d6920a042563f This fixes compatibility with the Rack 1.5.x series. --- lib/raindrops/watcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.4.GIT