[mod_python] weird request.connection.remote_ip value

David Harvey dmharvey at math.harvard.edu
Sat Jul 8 22:13:35 EDT 2006

I'm running mod_python 3.2.8 on Mac OS 10.4.6, python 2.4.3, apache  
2.2.2, on my desktop machine.

I've got apache set up to load this script:

========================= begin

from mod_python import apache

def handler(request):
     return apache.OK

========================= end

When I browse to "", the script prints out  
"" as expected.

If I connect from a local network, e.g. to "" it  
prints out "" (the address of the other machine) as expected.

But when I browse to "http://localhost/" from this machine, it prints  

What does "::1" mean? Why isn't it giving me an IP address? Shouldn't  
I be getting "" as above? How can I guarantee to get an IP  



More information about the Mod_python mailing list