From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: [PATCH 2/3] watcher: set Content-Type via assignment Date: Thu, 11 Apr 2013 23:28:23 +0000 Message-ID: <1365722904-889-2-git-send-email-normalperson@yhbt.net> References: <1365722904-889-1-git-send-email-normalperson@yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1365722941 12652 80.91.229.3 (11 Apr 2013 23:29:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 23:29:01 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Fri Apr 12 01:29:05 2013 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:106 Archived-At: Received: from zedshaw2.xen.prgmr.com ([71.19.156.177]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQQvP-0001dM-15 for gclrrg-raindrops@m.gmane.org; Fri, 12 Apr 2013 01:29:03 +0200 Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id E799173DFD for ; Thu, 11 Apr 2013 23:29:20 +0000 (UTC) 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 @@ def reset!(env, addr) 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 -- 1.8.2.279.g631bc94