﻿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
19277	LocaleMiddleware permanent redirects	ppetrid@…	Tim Graham <timograham@…>	"the process_response() method of django.middleware.locale.LocaleMiddleware redirects urls as follows when using i18n_patterns:
http://example.com/whatever/ becomes http://example.com/en/whatever/

These sorts of redirects must be permanent (301) and not temporary (302). The reasoning behind this: 302 redirects suggest that the requested page does have a content of its own (therefore it is a perfectly valid permalink) but for some reason we are temporarily redirected to another page. This is not true in our case, /whatever/ is a duplicate of /en/whatever/ and users will always get redirected as long as the middleware is enabled. Current behavior can be confusing to web crawlers as well.

The HttpResponseRedirect response should become HttpResponsePermanentRedirect to fix this. I'll provide the patch if ticket gets accepted."	New feature	closed	Internationalization	dev	Normal	fixed			Accepted	1	1	0	1	0	0
