From 734133e15620584618df49e76ecabd7c28c72444 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 18 Mar 2011 08:20:11 +0000 Subject: watcher: prevent Rack::Deflater from buffering Set "Cache-Control: no-transform" to prevent frontend proxies from flushing data. --- lib/raindrops/watcher.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb index 40b53c5..52a8eff 100644 --- a/lib/raindrops/watcher.rb +++ b/lib/raindrops/watcher.rb @@ -339,7 +339,10 @@ class Raindrops::Watcher end def finish - headers = { "Content-Type" => "text/plain" } + headers = { + "Content-Type" => "text/plain", + "Cache-Control" => "no-transform", + } headers["Transfer-Encoding"] = "chunked" if @chunk [ 200, headers, self ] end -- cgit v1.2.3-24-ge0c7