I knew I’d seen this before somewhere
Explanation from PR 6264, which added the extra test and behaviour:
The redirect should only happen on
/
URL, withprefix_default_language
set toTrue
(default behaviour).Each other request (like
/fr/whatever/
) should not look atAccept-Language
header at all,
just serve the page for the language requested in URL.When the
prefix_default_language
isFalse
the/
url is the same as/en/
(withsettings.LANGUAGE_CODE=en
) so we should just ignore theAccept-Language
here.