diff --git a/VERSION b/VERSION index 3d407fd7..4a54ac51 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.1-alpha.2+timestamp.2013.02.13.08.40.47 +Version 2.4.1-alpha.2+timestamp.2013.02.13.08.47.47 diff --git a/gluon/main.py b/gluon/main.py index 5d1c1081..5a9814ef 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -132,9 +132,8 @@ def get_client(env): if all fails, assume '127.0.0.1' or '::1' (running locally) """ g = regex_client.search(env.get('http_x_forwarded_for', '')) - if g: - client = (g.group() or '').split(',')[0] - else: + client = (g.group() or '').split(',')[0] if g else None + if client in (None, '', 'unkown'): g = regex_client.search(env.get('remote_addr', '')) if g: client = g.group()