about summary refs log tree commit homepage
path: root/lib/unicorn/cgi_wrapper.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-04-12 23:41:30 -0700
committerEric Wong <normalperson@yhbt.net>2009-04-12 23:43:00 -0700
commit18af4dbcc14eb7765bc021f94a444cc394864c26 (patch)
tree57a57621024ade521588db1089fae17485d90e86 /lib/unicorn/cgi_wrapper.rb
parentdc60ca25aa72bcee0becc4cdebb1be67acc5b5b5 (diff)
downloadunicorn-18af4dbcc14eb7765bc021f94a444cc394864c26.tar.gz
Hopefully the world will just move to Rack faster
so we have less things to worry about.
Diffstat (limited to 'lib/unicorn/cgi_wrapper.rb')
-rw-r--r--lib/unicorn/cgi_wrapper.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/unicorn/cgi_wrapper.rb b/lib/unicorn/cgi_wrapper.rb
index 48771fd..bc622ea 100644
--- a/lib/unicorn/cgi_wrapper.rb
+++ b/lib/unicorn/cgi_wrapper.rb
@@ -71,11 +71,9 @@ class Unicorn::CGIWrapper < ::CGI
 
     # Capitalized "Status:", with human-readable status code (e.g. "200 OK")
     parseable_status = @head.delete(Status)
-    unless @status
-      @status ||= parseable_status.split(/ /)[0].to_i rescue 404
-    end
+    @status ||= parseable_status.split(/ /)[0].to_i rescue 500
 
-    [ @status, @head, [ @body.string ] ]
+    [ @status || 500, @head, [ @body.string ] ]
   end
 
   # The header is typically called to send back the header.  In our case we