﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32768	An incorrect language is sometimes displayed - redirects adding a language code to a path can be inappropriate cached by HTTP caches	Alex Hayward	nobody	"We have a multi-lingual site using LocaleMiddleware. With a CDN and caching reverse proxy in use, the following sequence of events can happen:

* Fetch https://example.com/some-page/ with Accept-Language header 'de-DE,de;q=0.9'. A redirect to https://example.com/de/some-page/ is returned.
* Fetch it again with Accept-Language header 'fr-FR,fr;q=0.9'. The cached redirect is returned by HTTP caches and the German page is displayed instead of the French one.

LocaleMiddleware is issuing a redirect based on the detected language from the Accept-Language header or from the cookie chosen by settings.LANGUAGE_COOKIE_NAME but is not telling caches that it has used these headers.

Adding a Vary header fixes this.
"	Bug	closed	Internationalization	3.1	Normal	fixed			Ready for checkin	1	0	0	0	0	0
