comparison rhodecode/lib/base.py @ 3168:2fb94c52e20e beta

whitespace cleanup
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 18 Jan 2013 01:05:23 +0100
parents 8046d1979674
children cd50d1b5f35b 72a91632b731
comparison
equal deleted inserted replaced
3167:87258a137018 3168:2fb94c52e20e
42 return ip 42 return ip
43 43
44 ip = environ.get(proxy_key2) 44 ip = environ.get(proxy_key2)
45 if ip: 45 if ip:
46 # HTTP_X_FORWARDED_FOR can have mutliple ips inside 46 # HTTP_X_FORWARDED_FOR can have mutliple ips inside
47 # the left-most being the original client, and each successive proxy 47 # the left-most being the original client, and each successive proxy
48 # that passed the request adding the IP address where it received the 48 # that passed the request adding the IP address where it received the
49 # request from. 49 # request from.
50 if ',' in ip: 50 if ',' in ip:
51 ip = ip.split(',')[0].strip() 51 ip = ip.split(',')[0].strip()
52 return ip 52 return ip
53 53