raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.org
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> (raw)
In-Reply-To: <1365722904-889-1-git-send-email-normalperson@yhbt.net>

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



  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 23:28 [PATCH 1/3] raindrops: favor configured processor count over online count Eric Wong
2013-04-11 23:28 ` Eric Wong [this message]
2013-04-11 23:28 ` [PATCH 3/3] Linux::TCP_Info: implement #get! instance method Eric Wong
2013-04-11 23:30 ` [PATCH 1/3] raindrops: favor configured processor count over online count Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365722904-889-2-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=raindrops@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox