http_response: allow nil values in response headers
commit2cf1b3df5d58c716ada873f0ae7803142e3da362
authorEric Wong <e@80x24.org>
Mon, 16 Nov 2015 23:55:01 +0000 (16 23:55 +0000)
committerEric Wong <e@80x24.org>
Tue, 17 Nov 2015 00:05:29 +0000 (17 00:05 +0000)
treea7d72b9f4a237cbd900c83ba8cf53fd8b1c23b1f
parentf8d431040eb863b226ded089113340e68d598914
http_response: allow nil values in response headers

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>
lib/unicorn/http_response.rb
test/unit/test_response.rb