diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-21 04:01:01 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-21 08:23:23 +0000 |
commit | 6cca8e61c66c1c2a8ebe260813fa83e44530a768 (patch) | |
tree | aa03a017b387712118ac2f4c5065dcb636de4a4a /lib | |
parent | c4d77de381c40cf315e6f84791e3fb634bc10675 (diff) | |
download | unicorn-6cca8e61c66c1c2a8ebe260813fa83e44530a768.tar.gz |
We no longer blindly return 200 if the CGI returned another error code. We also don't want two Status headers in our output since we no longer filter it out.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicorn/app/exec_cgi.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/unicorn/app/exec_cgi.rb b/lib/unicorn/app/exec_cgi.rb index be89869..f7b4249 100644 --- a/lib/unicorn/app/exec_cgi.rb +++ b/lib/unicorn/app/exec_cgi.rb @@ -115,8 +115,9 @@ module Unicorn::App when /^[ \t]/ then headers[prev] << "\n#{line}" if prev end end + status = headers.delete("Status") || 200 headers['Content-Length'] = size.to_s - [ 200, headers, out ] + [ status, headers, out ] end # ensures rack.input is a file handle that we can redirect stdin to |