From 13c71ade9b8860e7cc49f86edb3490235fd1bce6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 6 Aug 2009 15:42:41 -0700 Subject: http_response: pass through unknown status codes Rack::Utils::HTTP_STATUS_CODES does not define all status codes that are assigned by IANA nor does it handle experimental/unknown/ad-hoc status codes. So fall back to blindly accepting the status code as given by the application and hope it works. --- lib/unicorn/http_response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index 15df3f6..3bf9347 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -37,7 +37,7 @@ module Unicorn # writes the rack_response to socket as an HTTP response def self.write(socket, rack_response) status, headers, body = rack_response - status = CODES[status.to_i] + status = CODES[status.to_i] || status OUT.clear # Don't bother enforcing duplicate supression, it's a Hash most of -- cgit v1.2.3-24-ge0c7