From cfe41e916659ccccc81a32d99a1d786a29fe1578 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Sat, 12 Aug 2006 23:12:46 +0000 Subject: Fixes redirects not working with new unlocked IO, becase Matt P. showed me I'm a lame moron. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@320 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel/cgi.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/mongrel/cgi.rb') diff --git a/lib/mongrel/cgi.rb b/lib/mongrel/cgi.rb index 62214d2..b327def 100644 --- a/lib/mongrel/cgi.rb +++ b/lib/mongrel/cgi.rb @@ -85,6 +85,7 @@ module Mongrel options.each{|k,v| @head[k] = v} end + STDERR.puts "HEADER: #{@head.inspect}" # doing this fakes out the cgi library to think the headers are empty # we then do the real headers in the out function call later "" @@ -132,12 +133,16 @@ module Mongrel header(options) + STDERR.puts "RAILS: #{options.inspect}, HEADER: #{@head.inspect}" + @response.start status do |head, body| send_cookies(head) @head.each {|k,v| head[k] = v} body.write(yield || "") end + + @out_called = true end # Computes the status once, but lazily so that people who call header twice @@ -151,6 +156,7 @@ module Mongrel @status = stat || "200" end + STDERR.puts "STATUS: #{@status} from HEAD: #{@head["Status"]}" @status end -- cgit v1.2.3-24-ge0c7