diff options
-rw-r--r-- | lib/unicorn/http_response.rb | 2 | ||||
-rw-r--r-- | test/unit/test_response.rb | 12 |
2 files changed, 1 insertions, 13 deletions
diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index ccf7110..2d13863 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -32,7 +32,7 @@ module Unicorn::HttpResponse next if %r{\A(?:Date\z|Status\z|Connection\z)}i =~ key if value =~ /\n/ # avoiding blank, key-only cookies with /\n+/ - buf << value.split(/\n+/).map! { |v| "#{key}: #{v}\r\n" }.join('') + buf << value.split(/\n+/).map! { |v| "#{key}: #{v}\r\n" }.join else buf << "#{key}: #{value}\r\n" end diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb index e5245e8..7dcf977 100644 --- a/test/unit/test_response.rb +++ b/test/unit/test_response.rb @@ -29,18 +29,6 @@ class ResponseTest < Test::Unit::TestCase assert_equal 1, out.string.split(/\r\n/).grep(/^Status: 200 OK/).size end - def test_response_OFS_set - old_ofs = $, - $, = "\f\v" - out = StringIO.new - http_response_write(out,[200, {"X-k" => "cd","X-y" => "z"}, ["cool"]]) - assert out.closed? - resp = out.string - assert ! resp.include?("\f\v"), "output didn't use $, ($OFS)" - ensure - $, = old_ofs - end - def test_response_200 io = StringIO.new http_response_write(io, [200, {}, []]) |