diff options
author | Eric Wong <e@80x24.org> | 2015-11-16 23:55:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-11-17 00:05:29 +0000 |
commit | 2cf1b3df5d58c716ada873f0ae7803142e3da362 (patch) | |
tree | a7d72b9f4a237cbd900c83ba8cf53fd8b1c23b1f /test/unit | |
parent | f8d431040eb863b226ded089113340e68d598914 (diff) | |
download | unicorn-2cf1b3df5d58c716ada873f0ae7803142e3da362.tar.gz |
This blatantly violates Rack SPEC, but we've had this bug since March 2009[1]. Thus, we cannot expect all existing applications and middlewares to fix this bug and will probably have to support it forever. Unfortunately, supporting this bug contributes to application server lock-in, but at least we'll document it as such. [1] commit 1835c9e2e12e6674b52dd80e4598cad9c4ea1e84 ("HttpResponse: speed up non-multivalue headers") Reported-by: Owen Ou <o@heroku.com> Ref: <CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com>
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/test_response.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb index 0b14d59..fbe433f 100644 --- a/test/unit/test_response.rb +++ b/test/unit/test_response.rb @@ -33,6 +33,15 @@ class ResponseTest < Test::Unit::TestCase assert out.length > 0, "output didn't have data" end + # ref: <CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com> + def test_response_header_broken_nil + out = StringIO.new + http_response_write(out, 200, {"Nil" => nil}, %w(hysterical raisin)) + assert ! out.closed? + + assert_match %r{^Nil: \r\n}sm, out.string, 'nil accepted' + end + def test_response_string_status out = StringIO.new http_response_write(out,'200', {}, []) |