about summary refs log tree commit homepage
path: root/test/test_output_buffering.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_output_buffering.rb')
-rw-r--r--test/test_output_buffering.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_output_buffering.rb b/test/test_output_buffering.rb
index da93b87..ba3e94a 100644
--- a/test/test_output_buffering.rb
+++ b/test/test_output_buffering.rb
@@ -126,7 +126,10 @@ class TestOutputBuffering < Testcase
           end
           size = gplv3.size
           len = size.to_s
-          ranges = Rack::Utils.byte_ranges(e, size)
+
+          ranges = Rack::Utils.respond_to?(:get_byte_ranges) ?
+                   Rack::Utils.get_byte_ranges(e['HTTP_RANGE'], size) :
+                   Rack::Utils.byte_ranges(e, size)
           status = 200
           h = { "Content-Type" => "text/plain", "Content-Length" => len }
           if ranges && ranges.size == 1