Django

Code

Changeset 6397

Show
Ignore:
Timestamp:
09/20/07 12:03:14 (1 year ago)
Author:
jacob
Message:

Fixed #3872, which turns out to not have been a bug in the first place, by reverting [6364].

Files:

Legend:

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

    r6364 r6397  
    5555            return None 
    5656        else: 
    57             # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. 
    58             # Take just the last one. 
    59             # See http://bob.pythonmac.org/archives/2005/09/23/apache-x-forwarded-for-caveat/ 
    60             real_ip = real_ip.split(",")[-1].strip() 
     57            # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. The 
     58            # client's IP will be the first one. 
     59            real_ip = real_ip.split(",")[0].strip() 
    6160            request.META['REMOTE_ADDR'] = real_ip