Ticket #4685: check_protocol.diff
File check_protocol.diff, 669 bytes (added by , 17 years ago) |
---|
-
django/views/defaults.py
61 61 # If all that malarkey found an object domain, use it; otherwise fall back 62 62 # to whatever get_absolute_url() returned. 63 63 if object_domain is not None: 64 return http.HttpResponseRedirect('http://%s%s' % (object_domain, absurl)) 64 protocol = request.is_secure() and 'https' or 'http' 65 return http.HttpResponseRedirect('%s://%s%s' % (protocol, object_domain, absurl)) 65 66 else: 66 67 return http.HttpResponseRedirect(absurl) 67 68