diff options
Diffstat (limited to 'lib/mongrel/cgi.rb')
-rw-r--r-- | lib/mongrel/cgi.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |