diff options
Diffstat (limited to 'unicorn-4.5.0-teeinput-namespace-conflict.patch')
-rw-r--r-- | unicorn-4.5.0-teeinput-namespace-conflict.patch | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/unicorn-4.5.0-teeinput-namespace-conflict.patch b/unicorn-4.5.0-teeinput-namespace-conflict.patch new file mode 100644 index 0000000..e2fceea --- /dev/null +++ b/unicorn-4.5.0-teeinput-namespace-conflict.patch @@ -0,0 +1,110 @@ +--- a/test/unit/test_tee_input.rb 2012-12-27 16:58:26.363046370 -0500 ++++ b/test/unit/test_tee_input.rb 2012-12-27 16:57:47.608044611 -0500 +@@ -4,7 +4,7 @@ + require 'digest/sha1' + require 'unicorn' + +-class TeeInput < Unicorn::TeeInput ++class MyTeeInput < Unicorn::TeeInput + attr_accessor :tmp, :len + end + +@@ -31,7 +31,7 @@ + + def test_gets_long + r = init_request("hello", 5 + (4096 * 4 * 3) + "#$/foo#$/".size) +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + status = line = nil + pid = fork { + @rd.close +@@ -52,7 +52,7 @@ + + def test_gets_short + r = init_request("hello", 5 + "#$/foo".size) +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + status = line = nil + pid = fork { + @rd.close +@@ -71,7 +71,7 @@ + + def test_small_body + r = init_request('hello') +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + assert_equal 0, @parser.content_length + assert @parser.body_eof? + assert_equal StringIO, ti.tmp.class +@@ -85,7 +85,7 @@ + + def test_read_with_buffer + r = init_request('hello') +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + buf = '' + rv = ti.read(4, buf) + assert_equal 'hell', rv +@@ -100,7 +100,7 @@ + + def test_big_body + r = init_request('.' * Unicorn::Const::MAX_BODY << 'a') +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + assert_equal 0, @parser.content_length + assert @parser.body_eof? + assert_kind_of File, ti.tmp +@@ -112,7 +112,7 @@ + a, b = 300, 3 + r = init_request('.' * b, 300) + assert_equal 300, @parser.content_length +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + pid = fork { + @wr.write('.' * 197) + sleep 1 # still a *potential* race here that would make the test moot... +@@ -126,7 +126,7 @@ + + def test_big_body_multi + r = init_request('.', Unicorn::Const::MAX_BODY + 1) +- ti = TeeInput.new(@rd, r) ++ ti = MyTeeInput.new(@rd, r) + assert_equal Unicorn::Const::MAX_BODY, @parser.content_length + assert ! @parser.body_eof? + assert_kind_of File, ti.tmp +@@ -165,7 +165,7 @@ + @wr.write("0\r\n\r\n") + } + @wr.close +- ti = TeeInput.new(@rd, @parser) ++ ti = MyTeeInput.new(@rd, @parser) + assert_nil @parser.content_length + assert_nil ti.len + assert ! @parser.body_eof? +@@ -204,7 +204,7 @@ + end + @wr.write("0\r\n\r\n") + } +- ti = TeeInput.new(@rd, @parser) ++ ti = MyTeeInput.new(@rd, @parser) + assert_nil @parser.content_length + assert_nil ti.len + assert ! @parser.body_eof? +@@ -234,7 +234,7 @@ + @wr.write("Hello: World\r\n\r\n") + } + @wr.close +- ti = TeeInput.new(@rd, @parser) ++ ti = MyTeeInput.new(@rd, @parser) + assert_nil @parser.content_length + assert_nil ti.len + assert ! @parser.body_eof? +@@ -256,7 +256,7 @@ + assert_equal "", buf + + @wr.write("9\r\nabcde") +- ti = TeeInput.new(@rd, @parser) ++ ti = MyTeeInput.new(@rd, @parser) + assert_nil @parser.content_length + assert_equal "abcde", ti.read(9) + assert ! @parser.body_eof? |