Test client ignores scheme on redirect
|Reported by:||Todd Gardner||Owned by:||nobody|
|Severity:||Keywords:||test client is_secure|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
While handling redirects, the test client ignores the scheme component of the redirect Location, which means the resulting redirect always have is_secure as False. This leads to problems when using a https redirect like http://www.djangosnippets.org/snippets/85/ (the test client will think it has gone into a redirect loop rather than arrive at the proper page). I've attached a patch which sets the scheme from Location if present.