undertow-io/undertow — pull request #223 by alfh (2014-07-01 11:21:08+00:00)
Title: Make LocaleUtils return default locale if no value is specified for Accept-Language

If a client includes the Accept-Language header in request, but has no value
for the header, then currently LocaleUtils.getLocalesFromHeader will return an
empty list. That will cause an exception in io.undertow.servlet.spec.HttpServletRequestImpl.getLocale.
Currently, if LocaleUtils.getLocalesFromHeader does not see any Accept-Language
header, it will return the Locale.getDefault().

So we should also return Locale.getDefault() if the Accept-Language has no value