@@ -0,0 +1,984 @@
+package jaxrs;%0A%0Aimport java.util.Locale;%0A%0Aimport javax.annotation.Priority;%0Aimport javax.enterprise.context.ApplicationScoped;%0Aimport javax.mvc.locale.LocaleResolver;%0Aimport javax.mvc.locale.LocaleResolverContext;%0Aimport javax.ws.rs.core.HttpHeaders;%0A%0A/**%0A * Accounts for cases where a client sends an empty Accept-Language header,%0A * which causes an %22invalid locale%22 exception on CXF.%0A * %0A * @author Jesse Gallagher%0A * @since 2.3.0%0A * @see %3Ca href=%22https://github.com/jesse-gallagher/frostillic.us-Blog/issues/79%22%3EIssue #79%3C/a%3E%0A */%0A@ApplicationScoped%0A@Priority(1) // Must be before org.eclipse.krazo.locale.DefaultLocaleResolver%0Apublic class EmptyLocaleResolver implements LocaleResolver %7B%0A%0A%09@Override%0A%09public Locale resolveLocale(LocaleResolverContext context) %7B%0A%09%09String langHeader = context.getHeaderString(HttpHeaders.ACCEPT_LANGUAGE);%0A%09%09if(%22%22.equals(langHeader)) %7B //$NON-NLS-1$%0A%09%09%09// Then it's an empty but extant header%0A%09%09%09return Locale.getDefault();%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%0A%7D%0A

Add EmptyLocaleResolver to account for empty Accept-Language headers (Issue #79)