Closed namedgraph closed 8 years ago
Right now ResourceBase uses new Locale() which is then used to build Variant list and compared against Accept-Language of the request. Constructed this way, the language tag does not match and leads to 406 Not Acceptable errors.
ResourceBase
new Locale()
Variant
Accept-Language
406 Not Acceptable
The correct way to construct Locale from language tag seems to be Locale.forLanguageTag(): http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#forLanguageTag(java.lang.String)
Locale
Locale.forLanguageTag()
Seems to be fixed: https://github.com/Graphity/graphity-processor/blob/d365b79e3739f0b828da658260916762ca57cd9f/src/main/java/org/graphity/processor/model/impl/ResourceBase.java#L659
Right now
ResourceBase
usesnew Locale()
which is then used to buildVariant
list and compared againstAccept-Language
of the request. Constructed this way, the language tag does not match and leads to406 Not Acceptable
errors.The correct way to construct
Locale
from language tag seems to beLocale.forLanguageTag()
: http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#forLanguageTag(java.lang.String)