Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Rainer Jung
On 10.03.2009 23:10, André Warnier wrote: Rainer Jung wrote: [...] 2) getRemoteAddr() gives you the address of the system, which opened the connection. In case of an AJP connector, this is not true, because AJP is meant to be used for reverse proxies. So here you get the address of the system

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 3/10/2009 12:19 PM, Rainer Jung wrote: 1) There is no standard http header named REMOTE_ADDR. Not even within Tomcat. So whatever you get out of this header depends completely on whoever set it for you. It might not exist or contain

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, On 3/11/2009 4:51 PM, Christopher Schultz wrote: Rainer, On 3/10/2009 12:19 PM, Rainer Jung wrote: 1) There is no standard http header named REMOTE_ADDR. Not even within Tomcat. So whatever you get out of this header depends completely on

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Rainer Jung
On 11.03.2009 21:51, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2) getRemoteAddr() gives you the address of the system, which opened the connection. In case of an AJP connector, this is not true, because AJP is meant to be used for reverse proxies. So here you get

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 3/11/2009 5:06 PM, Rainer Jung wrote: No, because [mod_jk] tries to act transparent by default, so it passes the original client/server situation to Tomcat and Tomcat patches it's client and server data inside the AJP connector in order

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Rainer Jung
On 11.03.2009 22:22, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 3/11/2009 5:06 PM, Rainer Jung wrote: No, because [mod_jk] tries to act transparent by default, so it passes the original client/server situation to Tomcat and Tomcat patches it's client

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 3/11/2009 6:45 PM, Rainer Jung wrote: On 11.03.2009 22:22, Christopher Schultz wrote: Your previous message seems to say that mod_jk will provide the IP address of the server running httpd as the REMOTE_ADDR when seen by Tomcat. I

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-11 Thread Rainer Jung
On 11.03.2009 23:52, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 3/11/2009 6:45 PM, Rainer Jung wrote: On 11.03.2009 22:22, Christopher Schultz wrote: Your previous message seems to say that mod_jk will provide the IP address of the server running

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 3/6/2009 2:03 PM, Mark Thomas wrote: Bing Zheng wrote: The tomcat server (version 5.5.23) is behind a load balancer. If I use request.getRemoteAddr(), it returns the load balancer's ip. If I use request.getHeader(REMOTE_ADDR), it

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-10 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 3/6/2009 2:03 PM, Mark Thomas wrote: Bing Zheng wrote: The tomcat server (version 5.5.23) is behind a load balancer. If I use request.getRemoteAddr(), it returns the load balancer's ip. If I use

RE: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-10 Thread Ilya Kazakevich
[mailto:ch...@christopherschultz.net] Sent: Tuesday, March 10, 2009 6:45 PM To: Tomcat Users List Subject: Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 3/6/2009 2:03 PM, Mark Thomas wrote: Bing Zheng wrote: The tomcat server

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-10 Thread Rainer Jung
On 10.03.2009 17:02, André Warnier wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 3/6/2009 2:03 PM, Mark Thomas wrote: Bing Zheng wrote: The tomcat server (version 5.5.23) is behind a load balancer. If I use request.getRemoteAddr(), it returns the

Re: request.getRemoteAddr() vs. request.getHeader(REMOTE_ADDR)

2009-03-10 Thread André Warnier
Rainer Jung wrote: [...] 2) getRemoteAddr() gives you the address of the system, which opened the connection. In case of an AJP connector, this is not true, because AJP is meant to be used for reverse proxies. So here you get the address of the system which opened the connection to the web