#987: HttpResponseRedirect uses/allows relative URIs for the HTTP Location
header, which is forbidden by HTTP
----------------------------------+-----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: closed | Component: Core framework
Version: | Resolution: fixed
Keywords: | Stage: Ready for checkin
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
----------------------------------+-----------------------------------------
Changes (by absoludity):
* cc: [EMAIL PROTECTED] (added)
Comment:
Am I right in saying that since this change, all unit tests using
something along the lines of:
self.assertRedirects(response, '/accounts/login/')
will currently need to include the actual site's url (or a settings
variable) like:
self.assertRedirects(response, settings.HOME_URL + '/accounts/login/')
(certainly seems to be the case for me!)?
If so, I'm guessing assertRedirects needs to be updated so that it only
checks the path of the response['Location'] (although this won't always be
true either, for eg where people are using middleware subdomain mapping to
do things like http://me.example.com/inbox/ ->
http://example.com/u/me/inbox/ etc.).
Or is it better to leave as is so that the unit-tests are coupled to site?
Thoughts?
Thanks for any feedback!
-Michael
--
Ticket URL: <http://code.djangoproject.com/ticket/987#comment:26>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---