Sorry,I've got it: my $ip = $ENV{'HTTP_X_FORWARDED_FOR'} ? $ENV{'HTTP_X_FORWARDED_FOR'} : $q->remote_host();
Thanks, --Jeff -----Original Message----- From: [EMAIL PROTECTED] To: mason-users@lists.sourceforge.net Sent: Mon, 4 Sep 2006 4:05 PM Subject: [Mason] How to get CGI request header element? Hello,dear all, I want to get the request header element in my CGI scripts which are developed with CGI.pm. For example,for some of the requests to our servers,their headers have the element of 'X_FORWARDED_FOR => xx.xx.xx.xx', where 'xx.xx.xx.xx' is original IP.I can get it in Java: request.getHeader("X_FORWARDED_FOR"). How can I get it in CGI scripts?Thank you. --Jeff ________________________________________________________________________ Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users ________________________________________________________________________ Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users