summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorChristian Metts <xian@mintchaos.com>2007-10-06 22:21:49 +0000
committerChristian Metts <xian@mintchaos.com>2007-10-06 22:21:49 +0000
commitcc1d4c06c53c703eb77b3a9e9ed2c55ca2017cec (patch)
tree057ce6d692c51bc1df0aa3267a90ebc6f9ff9548 /django/http
parenta83d1e9ceb103090e6aa2b0b1319d372a9b91270 (diff)
newforms-admin: Added link to current file for file-based widgets in the admin
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
-rw-r--r--django/http/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 9a47e70592..baf9a11955 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -48,6 +48,8 @@ class HttpRequest(object):
"Returns the HTTP host using the environment or request headers."
# We try three options, in order of decreasing preference.
host = self.META.get('HTTP_X_FORWARDED_HOST', '')
+ if host:
+ return host
if 'HTTP_HOST' in self.META:
host = self.META['HTTP_HOST']
else: