about summary refs log tree commit homepage
path: root/test/unit/test_request.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2023-06-01 08:55:14 -0700
committerEric Wong <bofh@yhbt.net>2023-06-05 09:17:18 +0000
commit9d7bab0bc2211b20806d4d0289a7ea992e49a8a1 (patch)
tree75973762205d106e2a621d0ed12fbb72fba4aa04 /test/unit/test_request.rb
parent5299c3f255dada8605c2cffed9eba1b68d9d42b4 (diff)
downloadunicorn-9d7bab0bc2211b20806d4d0289a7ea992e49a8a1.tar.gz
Most changes are to the tests to avoid uppercase characters in header
keys, which are no longer allowed in rack 3 (to allow for O(1) access).

This also changes a few places where an array of headers was used to
switch to a hash, as a hash is requierd in Rack 3.

Newer versions of curl use a 000 http_code for invalid http codes,
so switch from "42 -eq" to "500 -ne" in the test, as Rack::Lint will
always raise a 500 error.

There is one test that fails on OpenBSD when opening a fifo.  This is
unrelated to unicorn as far as I can see, so skip the remaining part
of the test in that case on OpenBSD.

Tests still pass on Rack 2, and presumably Rack 1 as well, though
I didn't test Rack 1.

Co-authored-by: Eric Wong <bofh@yhbt.net>
Diffstat (limited to 'test/unit/test_request.rb')
-rw-r--r--test/unit/test_request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb
index 6cb0268..7f22b24 100644
--- a/test/unit/test_request.rb
+++ b/test/unit/test_request.rb
@@ -22,7 +22,7 @@ class RequestTest < Test::Unit::TestCase
   def setup
     @request = HttpRequest.new
     @app = lambda do |env|
-      [ 200, { 'Content-Length' => '0', 'Content-Type' => 'text/plain' }, [] ]
+      [ 200, { 'content-length' => '0', 'content-type' => 'text/plain' }, [] ]
     end
     @lint = Rack::Lint.new(@app)
   end