Author: jacob
Date: 2007-09-20 12:03:14 -0500 (Thu, 20 Sep 2007)
New Revision: 6397
Modified:
django/trunk/django/middleware/http.py
Log:
Fixed #3872, which turns out to not have been a bug in the first place, by
reverting [6364].
Modified: django/trunk/django/middleware/http.py
===================================================================
--- django/trunk/django/middleware/http.py 2007-09-20 15:51:19 UTC (rev
6396)
+++ django/trunk/django/middleware/http.py 2007-09-20 17:03:14 UTC (rev
6397)
@@ -54,8 +54,7 @@
except KeyError:
return None
else:
- # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs.
- # Take just the last one.
- # See
http://bob.pythonmac.org/archives/2005/09/23/apache-x-forwarded-for-caveat/
- real_ip = real_ip.split(",")[-1].strip()
+ # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. The
+ # client's IP will be the first one.
+ real_ip = real_ip.split(",")[0].strip()
request.META['REMOTE_ADDR'] = real_ip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---