rack 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rack/request.rb +11 -1
- data/lib/rack/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaf18cf63641b74f599535734eddaf9886c6ffa7f7b00d9aca768715b25498f9
|
4
|
+
data.tar.gz: 375ef784b899a1f936505dfffef3d6da3ee0f546e0f90d475a9a4db3264281cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41667c1b8b3e3fe9ac3dd9c22f456a8eb5b756c310c28af98dd7b9ce998eed1a224c39c680019dabb3dedd32cff762d1274a63770f2372a12874f92d026713a6
|
7
|
+
data.tar.gz: ca3837da3ae9a4bf02cf540661c00755e9db416d6c2b268e92df759f77a882646da3b3cb229668ccc409d0764fccb70fcba34134cbece934927adda5a14e5564
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
|
4
4
|
|
5
|
+
## [3.1.6] - 2024-07-03
|
6
|
+
|
7
|
+
- Fix several edge cases in `Rack::Request#parse_http_accept_header`'s implementation. ([#2226](https://github.com/rack/rack/pull/2226), [@ioquatix])
|
8
|
+
|
5
9
|
## [3.1.5] - 2024-07-02
|
6
10
|
|
7
11
|
### Security
|
data/lib/rack/request.rb
CHANGED
@@ -642,7 +642,13 @@ module Rack
|
|
642
642
|
end
|
643
643
|
|
644
644
|
def parse_http_accept_header(header)
|
645
|
-
|
645
|
+
# It would be nice to use filter_map here, but it's Ruby 2.7+
|
646
|
+
parts = header.to_s.split(',')
|
647
|
+
|
648
|
+
parts.map! do |part|
|
649
|
+
part.strip!
|
650
|
+
next if part.empty?
|
651
|
+
|
646
652
|
attribute, parameters = part.split(';', 2)
|
647
653
|
attribute.strip!
|
648
654
|
parameters&.strip!
|
@@ -652,6 +658,10 @@ module Rack
|
|
652
658
|
end
|
653
659
|
[attribute, quality]
|
654
660
|
end
|
661
|
+
|
662
|
+
parts.compact!
|
663
|
+
|
664
|
+
parts
|
655
665
|
end
|
656
666
|
|
657
667
|
# Get an array of values set in the RFC 7239 `Forwarded` request header.
|
data/lib/rack/version.rb
CHANGED