Ticket #8281: django.patch

File django.patch, 524 bytes (added by KayEss, 16 years ago)

Django patch

  • __init__.py

     
    8383        return location
    8484
    8585    def is_secure(self):
    86         return os.environ.get("HTTPS") == "on"
     86        environ = os.environ.get("HTTPS")
     87        if environ:
     88            return environ == "on"
     89        return self.META.get("HTTPS").lower() == "on"
    8790
    8891    def is_ajax(self):
    8992        return self.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest'
Back to Top