I'm sorry for my without thking words saying that use
request.remoteAddr.host can't get client ip address
actually it works well.
Because AJAX's GET or POST method have domain limitation, and I deploy my
twisted.web2 program under Nginx.
so it is not a client direct request my web2 program, it's nginx request my.
web2 program is allways get 127.0.0.1.
i solve it in this way, edit nginx configure file,
add proxy_set_header REMOTE_ADDR $remote_addr;[1]
web2 program file
use request.headers._raw_headers.get('remote_addr', ['192.168.1.1'])[0]
[1]:http://wiki.codemongers.com/NginxHttpCoreModule#var_remote_addr
Graeme Glass,Jean-Paul: thanks for your reply^_^
2007/11/21, Jean-Paul Calderone <[EMAIL PROTECTED]>:
>
> It's better to explain how something didn't meet your expectations rather
> than to just say that it didn't.
>
> What about request.remoteAddr is not suitable?
>
> Jean-Paul
>
>
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web