!14 fix invalid range request test failed
From: @Gzx1999 Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
ffa8568ccf
23
Fix-broken-spec.patch
Normal file
23
Fix-broken-spec.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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)
|
||||||
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
Summary: Ruby-based web application framework
|
Summary: Ruby-based web application framework
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 2.0.8.1
|
Version: 2.0.8.1
|
||||||
Release: 2
|
Release: 3
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.sinatrarb.com/
|
URL: http://www.sinatrarb.com/
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
@ -15,6 +15,7 @@ Source1: %{gem_name}-%{version}-test.tar.gz
|
|||||||
Patch0: rubygem-sinatra-2.0.8.1-Fix-failing-tests.patch
|
Patch0: rubygem-sinatra-2.0.8.1-Fix-failing-tests.patch
|
||||||
Patch1: Internal-Sinatra-errors-now-extend-Sinatra-Error-test.patch
|
Patch1: Internal-Sinatra-errors-now-extend-Sinatra-Error-test.patch
|
||||||
Patch2: Internal-Sinatra-errors-now-extend-Sinatra-Error.patch
|
Patch2: Internal-Sinatra-errors-now-extend-Sinatra-Error.patch
|
||||||
|
Patch3: Fix-broken-spec.patch
|
||||||
BuildRequires: rubygems-devel ruby(release) ruby >= 2.2.0
|
BuildRequires: rubygems-devel ruby(release) ruby >= 2.2.0
|
||||||
%if ! 0%{?bootstrap}
|
%if ! 0%{?bootstrap}
|
||||||
BuildRequires: rubygem(rack) >= 2.0 rubygem(rack-protection) = %{version} rubygem(tilt)
|
BuildRequires: rubygem(rack) >= 2.0 rubygem(rack-protection) = %{version} rubygem(tilt)
|
||||||
@ -40,6 +41,7 @@ This package contains documentation for %{name}.
|
|||||||
pushd %{_builddir}
|
pushd %{_builddir}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch3 -p1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
@ -87,6 +89,9 @@ popd
|
|||||||
%{gem_instdir}/examples
|
%{gem_instdir}/examples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 11 2024 Zhengxin Guo <guozhengxin@kylinos.cn> - 1:2.0.8.1-3
|
||||||
|
- fix the correctly ignores syntactically invalid range requests test
|
||||||
|
|
||||||
* Tue Jan 17 2023 wulei <wulei80@h-partners.com> - 1:2.0.8.1-2
|
* Tue Jan 17 2023 wulei <wulei80@h-partners.com> - 1:2.0.8.1-2
|
||||||
- fix the error_highlight test
|
- fix the error_highlight test
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user