Re: [OT] HttpServletRequest.getRemoteAddr() sometimes returns NULL on Tomcat 9.0.30 and HTTP/2 secure requests

2020-02-10 Thread Manuel Dominguez Sarmiento
Hi Christopher, please see below: 1) The Tomcat valves operate on all webapps. We only need/require this for one particular webapp without affecting the others. Not true; see Konstantin's response. Yes, I realized per-context valve configuration was possible after I sent my original email.

Re: [OT] HttpServletRequest.getRemoteAddr() sometimes returns NULL on Tomcat 9.0.30 and HTTP/2 secure requests

2020-02-06 Thread Manuel Dominguez Sarmiento
Hi Konstantin, please see below: You can configure a Valve for a specific web application by placing it into Context configuration for that specific web application (usually that is the "/META-INF/context.xml" configuration file). [1] [1]

Re: [OT] HttpServletRequest.getRemoteAddr() sometimes returns NULL on Tomcat 9.0.30 and HTTP/2 secure requests

2020-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Manuel, On 2/5/20 1:29 PM, Manuel Dominguez Sarmiento wrote: > Yes, there are two reasons: > > 1) The Tomcat valves operate on all webapps. We only need/require > this for one particular webapp without affecting the others. Not true; see

Re: [OT] HttpServletRequest.getRemoteAddr() sometimes returns NULL on Tomcat 9.0.30 and HTTP/2 secure requests

2020-02-06 Thread Konstantin Kolinko
ср, 5 февр. 2020 г. в 21:29, Manuel Dominguez Sarmiento : > > Yes, there are two reasons: > > 1) The Tomcat valves operate on all webapps. We only need/require this > for one particular webapp without affecting the others. You can configure a Valve for a specific web application by placing it

Re: [OT] HttpServletRequest.getRemoteAddr() sometimes returns NULL on Tomcat 9.0.30 and HTTP/2 secure requests

2020-02-05 Thread Manuel Dominguez Sarmiento
Yes, there are two reasons: 1) The Tomcat valves operate on all webapps. We only need/require this for one particular webapp without affecting the others. 2) The code has been simplified for illustration purposes. Besides X-Forwarded-For, we detect and work around many other custom external

Re: [OT] HttpServletRequest.getRemoteAddr() sometimes returns NULL on Tomcat 9.0.30 and HTTP/2 secure requests

2020-02-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Manuel, On 2/5/20 12:12 PM, Manuel Dominguez Sarmiento wrote: > Our filter is not doing anything fancy (and it has always worked > correctly before we ran into this bug). In pseudo-code: > > public doFilter(request, response) { > > String ip =