23 lines
961 B
Diff
23 lines
961 B
Diff
|
|
From 5baa1c8ddcadfdfe07b74c2a72fc9a29121851fd Mon Sep 17 00:00:00 2001
|
||
|
|
From: Jordan Owens <jkowens@gmail.com>
|
||
|
|
Date: Sun, 22 Jan 2023 19:28:40 -0500
|
||
|
|
Subject: [PATCH] Fix broken spec
|
||
|
|
|
||
|
|
HTTP ranges with non decimal characters is treated as range 0..0 as of Rack 2.2.6.2.
|
||
|
|
---
|
||
|
|
test/static_test.rb | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/test/static_test.rb b/test/static_test.rb
|
||
|
|
index 232cd21c5d..0022f088b4 100644
|
||
|
|
--- a/test/static_test.rb
|
||
|
|
+++ b/test/static_test.rb
|
||
|
|
@@ -164,7 +164,7 @@ def assert_valid_range(http_range, range, path, file)
|
||
|
|
end
|
||
|
|
|
||
|
|
it 'correctly ignores syntactically invalid range requests' do
|
||
|
|
- ["bytes=45-40", "bytes=IV-LXVI", "octets=10-20", "bytes=", "bytes=3-1,4-5"].each do |http_range|
|
||
|
|
+ ["bytes=45-40", "octets=10-20", "bytes=", "bytes=3-1,4-5"].each do |http_range|
|
||
|
|
request = Rack::MockRequest.new(@app)
|
||
|
|
response = request.get("/#{File.basename(__FILE__)}", 'HTTP_RANGE' => http_range)
|
||
|
|
|