#12011 closed (fixed)
Test client ignores scheme on redirect
Reported by: | Todd Gardner | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.1 |
Severity: | Keywords: | test client is_secure | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Attachments (1)
Change History (5)
by , 15 years ago
Attachment: | test_client_redirect_scheme.diff added |
---|
comment:1 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
Patch to the test client to consider Location scheme