Django

Code

Changeset 6449

Show
Ignore:
Timestamp:
10/03/07 17:21:43 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4986 -- Fixed a logic bug from [6166].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/http/__init__.py

    r6296 r6449  
    4848        "Returns the HTTP host using the environment or request headers." 
    4949        # We try three options, in order of decreasing preference. 
    50         host = self.META.get('HTTP_X_FORWARDED_HOST', '') 
    51         if 'HTTP_HOST' in self.META: 
     50        if 'HTTP_X_FORWARDED_HOST' in self.META: 
     51            host = self.META['HTTP_X_FORWARDED_HOST'] 
     52        elif 'HTTP_HOST' in self.META: 
    5253            host = self.META['HTTP_HOST'] 
    5354        else: