QUTlib / rest-rmr

A RESTful RMR framework
Apache License 2.0
4 stars 1 forks source link

BasicRepresenter#preference_for_language doesn't follow RFC 2616 #13

Closed phluid61 closed 11 years ago

phluid61 commented 11 years ago

RFC 2616, section 14.4, states:

   A language-range matches a language-tag if
   it exactly equals the tag, or if it exactly equals a prefix of the
   tag such that the first tag character following the prefix is "-".
   The special range "*", if present in the Accept-Language field,
   matches every tag not matched by any other range present in the
   Accept-Language field.

The prefix case is not handled by Representer#pick_best and/or BasicRepresenter#preference_for_language