﻿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
25572	APPEND_SLASH (and others) sometimes redirect to invalid URL by encoding the entire URI	Amine Haddad	nobody	"When APPEND_SLASH is True (default), the request for ""/test/+123?foo=+123"" redirects to ""/test/%2B123/?foo=%2B123"" instead of ""/test/+123/?foo=%2B123"".

Sources:
http://stackoverflow.com/a/332897 (the ""+"" should not be encoded in escape or encodeURI)
https://github.com/django/django/blob/master/django/http/request.py#L122
https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters
https://www.ietf.org/rfc/rfc2396.txt ""Likewise, a URI must be separated into its components before the escaped characters within those components can be safely decoded.""

Sample urls.py line that redirects to the invalid ""/test/%2B123/"" when a slash is missing:

{{{
url(r'^test/(?P<foobar>\+[0-9]+)/$', 'test', name='test')
}}}

Solution: It should redirect to: /test/+123/?... instead of /test/%2B123/?...
"	Bug	closed	Core (URLs)	1.8	Normal	duplicate			Unreviewed	0	0	0	0	0	0
