web.py sets an "ip" attribute on web.ctx like so:

web/application.py
356:        ctx.ip = env.get('REMOTE_ADDR')



This is later used in web.session.Session._load:

web/session.py
88:        self.ip = web.ctx.ip



The purpose of this appears to be to detect the client's IP address and
associate it with his or her session.

If so, the web.py developers might be interested in using something like the
following instead, which I'm using because the above is naive (it assumes no
proxies are in front of the application, which would alter the value of
REMOTE_ADDR):

http://paste.pocoo.org/show/304192/

(I'm also setting a "last visited time" on the session while I'm at it, but
you can ignore that part for the purpose of this issue.)

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to we...@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to