We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f169ff7 commit e4c1177Copy full SHA for e4c1177
lib/rack/utils.rb
@@ -142,8 +142,8 @@ def build_nested_query(value, prefix = nil)
142
end
143
144
def q_values(q_value_header)
145
- q_value_header.to_s.split(/\s*,\s*/).map do |part|
146
- value, parameters = part.split(/\s*;\s*/, 2)
+ q_value_header.to_s.split(',').map do |part|
+ value, parameters = part.split(';', 2).map(&:strip)
147
quality = 1.0
148
if parameters && (md = /\Aq=([\d.]+)/.match(parameters))
149
quality = md[1].to_f
0 commit comments