Requests from browsers with more than 10 preferred languages fail with a server error
Description
Problem
Since GEN-864 moved the backend to Tomcat 10.1.61, the server rejects every request whose Accept-Language header lists more than 10 languages. The request fails with a 500 before it reaches the app, and production logs fill with IllegalArgumentException: More than the maximum allowed number of locales, [10], were detected. Browsers send all of the user's preferred languages, and Chrome and Edge add the base language after each regional one (pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7,...), so a person with six languages in their browser settings already goes over the limit. For them every page the app serves straight to the browser fails, for example decision links from emails and the external approver portal.
The limit is new in Tomcat 10.1.61 (connector attribute maxLocaleCount, default 10). The app never reads the request locale itself.
Change
-
The server accepts up to 20 languages in the
Accept-Languageheader, so requests from any browser setting are handled as they were before the upgrade.
Acceptance criteria
-
A request with 11 to 20 languages in
Accept-Languagegets the same response as one with a single language, and nothing is logged.
Manual tester notes
-
Chrome on QA: Settings > Languages > Preferred languages, add at least 11 languages. Open a decision link from a notification email with "Enable actions without login" on and decide: the page loads and the decision is recorded. Open the external approver portal from its email: it loads.
-
With the same browser setting, open the Approval Path pages and an approval panel in Jira and in Confluence: they load as usual.