diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-09-27 23:16:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-27 23:16:15 -0700 |
commit | 9d27c9a2ee7902788e0f8abc433c7da6302e4c24 (patch) | |
tree | 92ffad9e913314bb6ab0714f34276e94702778f2 | |
parent | 6d7230207e43bf8a6f6bdbe505fb05fbd70389ac (diff) | |
download | unicorn-9d27c9a2ee7902788e0f8abc433c7da6302e4c24.tar.gz |
Our HttpResponse class interprets non-Integer string status now as well as falling back if it can't be looked up.
-rw-r--r-- | lib/unicorn/cgi_wrapper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/unicorn/cgi_wrapper.rb b/lib/unicorn/cgi_wrapper.rb index 02cc184..8c90e95 100644 --- a/lib/unicorn/cgi_wrapper.rb +++ b/lib/unicorn/cgi_wrapper.rb @@ -72,8 +72,7 @@ class Unicorn::CGIWrapper < ::CGI end # Capitalized "Status:", with human-readable status code (e.g. "200 OK") - parseable_status = @head.delete(Status) - @status ||= parseable_status.split(/ /)[0].to_i rescue 500 + @status ||= @head.delete(Status) [ @status || 500, @head, [ @body.string ] ] end |