Closed SSDany closed 14 years ago
The first example above is invalid according to the spec:
The first "q" parameter (if any) separates the media-range parameter(s) from the accept-params.
The "a" parameter is invalid. The second example is also not valid according to the spec:
A weight is normalized to a real number in the range 0 through 1, where 0 is the minimum and 1 the maximum value.
42 is not a valid qvalue.
accept-extension: m = Rack::Accept::MediaType.new('text/_;q=0.5;a=42')
<Rack::Accept::MediaType:0x101706d70 @qvalues={"text/_;q=0.5;a=42"=>1}>
malformed qvalues: m = Rack::Accept::MediaType.new('text/_;q=42')
<Rack::Accept::MediaType:0x101700290 @qvalues={"text/_"=>42.0}>