rubygem-sinatra/Fix-broken-spec.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

2024-11-20 09:32:45 +08:00
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.
Origin:
https://github.com/sinatra/sinatra/commit/5baa1c8ddcadfdfe07b74c2a72fc9a29121851fd
---
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 d0cbbb0..5e3c34d 100644
--- a/test/static_test.rb
+++ b/test/static_test.rb
@@ -153,7 +153,7 @@ class StaticTest < Minitest::Test
it 'correctly ignores syntactically invalid range requests' do
# ...and also ignores multi-range requests, which aren't supported yet
- ["bytes=45-40", "bytes=IV-LXVI", "octets=10-20", "bytes=-", "bytes=1-2,3-4"].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)
--
2.27.0