Django

Code

Show
Ignore:
Timestamp:
07/04/07 01:02:00 (2 years ago)
Author:
mtredinnick
Message:

unicode: Merged from trunk up to [5600].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode

    • Property svnmerge-integrated changed from /django/trunk:1-5579 to /django/trunk:1-5600
  • django/branches/unicode/django/views/defaults.py

    r4612 r5601  
    2222 
    2323    # If the object actually defines a domain, we're done. 
    24     if absurl.startswith('http://')
     24    if absurl.startswith('http://') or absurl.startswith('https://')
    2525        return http.HttpResponseRedirect(absurl) 
    2626 
     
    6262    # to whatever get_absolute_url() returned. 
    6363    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)) 
    6566    else: 
    6667        return http.HttpResponseRedirect(absurl)