| 1 | *** django/http/__init__.py Sun Nov 18 13:44:28 2007
|
|---|
| 2 | --- django/http/__init__.py Sun Dec 9 22:10:26 2007
|
|---|
| 3 | ***************
|
|---|
| 4 | *** 44,51 ****
|
|---|
| 5 | return key in self.GET or key in self.POST
|
|---|
| 6 |
|
|---|
| 7 | __contains__ = has_key
|
|---|
| 8 | !
|
|---|
| 9 | ! def get_host(self):
|
|---|
| 10 | "Returns the HTTP host using the environment or request headers."
|
|---|
| 11 | # We try three options, in order of decreasing preference.
|
|---|
| 12 | if 'HTTP_X_FORWARDED_HOST' in self.META:
|
|---|
| 13 | --- 44,51 ----
|
|---|
| 14 | return key in self.GET or key in self.POST
|
|---|
| 15 |
|
|---|
| 16 | __contains__ = has_key
|
|---|
| 17 | !
|
|---|
| 18 | ! def _get_host(self):
|
|---|
| 19 | "Returns the HTTP host using the environment or request headers."
|
|---|
| 20 | # We try three options, in order of decreasing preference.
|
|---|
| 21 | if 'HTTP_X_FORWARDED_HOST' in self.META:
|
|---|
| 22 | ***************
|
|---|
| 23 | *** 59,65 ****
|
|---|
| 24 | if server_port != (self.is_secure() and 443 or 80):
|
|---|
| 25 | host = '%s:%s' % (host, server_port)
|
|---|
| 26 | return host
|
|---|
| 27 | !
|
|---|
| 28 | def get_full_path(self):
|
|---|
| 29 | return ''
|
|---|
| 30 |
|
|---|
| 31 | --- 59,71 ----
|
|---|
| 32 | if server_port != (self.is_secure() and 443 or 80):
|
|---|
| 33 | host = '%s:%s' % (host, server_port)
|
|---|
| 34 | return host
|
|---|
| 35 | !
|
|---|
| 36 | ! host = property(_get_host)
|
|---|
| 37 | !
|
|---|
| 38 | ! def get_host(self):
|
|---|
| 39 | ! "DEPRECIATED. Use host property instead"
|
|---|
| 40 | ! return self.host
|
|---|
| 41 | !
|
|---|
| 42 | def get_full_path(self):
|
|---|
| 43 | return ''
|
|---|
| 44 |
|
|---|