Ticket #6165: patch.2.diff
File patch.2.diff, 862 bytes (added by , 17 years ago) |
---|
-
http/__init__.py
old new class HttpRequest(object): 44 44 return key in self.GET or key in self.POST 45 45 46 46 __contains__ = has_key 47 48 def get_host(self):47 48 def _get_host(self): 49 49 "Returns the HTTP host using the environment or request headers." 50 50 # We try three options, in order of decreasing preference. 51 51 if 'HTTP_X_FORWARDED_HOST' in self.META: … … class HttpRequest(object): 59 59 if server_port != (self.is_secure() and 443 or 80): 60 60 host = '%s:%s' % (host, server_port) 61 61 return host 62 62 63 host = property(_get_host) 64 65 def get_host(self): 66 "DEPRECIATED. Use host property instead" 67 return self.host 68 63 69 def get_full_path(self): 64 70 return '' 65 71