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: distinction between resource charset and format octet decoding

2020-02-06 Thread Garret Wilson
On 1/8/2019 9:57 PM, Mark Thomas wrote: … Yes, this default is now very out-dated. That is a side-effect of: … As of Servlet 4.0 there is a specification compliant configuration option to change this default to any encoding of your choice. Obviously, UTF-8 is one of the options. You can do

Re: distinction between resource charset and format octet decoding

2020-02-06 Thread Mark Thomas
On 06/02/2020 13:30, Garret Wilson wrote: > On 1/8/2019 9:57 PM, Mark Thomas wrote: >> … >> >> Yes, this default is now very out-dated. That is a side-effect of: >> … >> As of Servlet 4.0 there is a specification compliant configuration >> option to change this default to any encoding of your

Re: distinction between resource charset and format octet decoding

2020-02-06 Thread Garret Wilson
On 2/6/2020 10:36 AM, Mark Thomas wrote: … Whether Tomcat should ship with this setting present in conf/web.xml by default is something that should probably be discussed for Tomcat 10. Given the current state of the web, there is a reasonable case for doing so. I'll add that to the TOMCAT-NEXT

Re: [OT] distinction between resource charset and format octet decoding

2020-02-06 Thread Garret Wilson
On 2/6/2020 11:46 AM, André Warnier (tomcat/perl) wrote: … As of Tomcat 10, conf/web.xml contains the following: UTF-8 UTF-8 That *should* have the effect you are looking for but I confess I haven't tested it in any great detail. As I am sure many people (Christopher included) would

Re: distinction between resource charset and format octet decoding

2020-02-06 Thread Mark Thomas
On 06/02/2020 13:39, Garret Wilson wrote: > On 2/6/2020 10:36 AM, Mark Thomas wrote: >> … Whether Tomcat should ship with this setting present in conf/web.xml by default is something that should probably be discussed for Tomcat 10. Given the current state of the web, there is a

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: distinction between resource charset and format octet decoding

2020-02-06 Thread Garret Wilson
On 2/6/2020 10:44 AM, Mark Thomas wrote: … As of Tomcat 10, conf/web.xml contains the following: UTF-8 UTF-8 That *should* have the effect you are looking for but I confess I haven't tested it in any great detail. Yes! Oh, that is so wonderful. Thank you! I brought this issue up on the

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Rémy Maucherat
On Thu, Feb 6, 2020 at 2:56 PM Hua Zhang wrote: > Thank you for the response. I am finally able to confirm the issue. > > When I put the following line in comment, everything works fine. I mean as > expected. > > ** > > > If the above line UpgradeProtocol is activated, I observe now at least two

Re: [OT] distinction between resource charset and format octet decoding

2020-02-06 Thread tomcat/perl
On 06.02.2020 14:44, Mark Thomas wrote: On 06/02/2020 13:39, Garret Wilson wrote: On 2/6/2020 10:36 AM, Mark Thomas wrote: … Whether Tomcat should ship with this setting present in conf/web.xml by default is something that should probably be discussed for Tomcat 10. Given the current state of

Re: [OT] distinction between resource charset and format octet decoding

2020-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Garret, On 2/6/20 10:25 AM, Garret Wilson wrote: > On 2/6/2020 11:46 AM, André Warnier (tomcat/perl) wrote: >> … >>> As of Tomcat 10, conf/web.xml contains the following: >>> >>> >>> UTF-8 >>> UTF-8 >>> >>> >>> That *should* have the effect

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Hua Zhang
Thank you for the response. I am finally able to confirm the issue. When I put the following line in comment, everything works fine. I mean as expected. ** If the above line UpgradeProtocol is activated, I observe now at least two weird situations. 1) As mentioned before, RewriteValve does

Re: [OT] distinction between resource charset and format octet decoding

2020-02-06 Thread Garret Wilson
On 2/6/2020 12:43 PM, Christopher Schultz wrote: … * Therefore `web.xml` settings, HTTP headers, etc. are all irrelevant, as this is an issue dealing with the file format itself, and the latest spec for the file format says to use UTF-8, so everyone should use UTF-8 already. Except for

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: RewriteValve does not work on HTTPS

2020-02-06 Thread Pierre Chiu
I just want to concur I have the same issue. Removing that one line upgradeprotocol and rewrite works again. On Thu, Feb 6, 2020 at 3:28 PM Hua Zhang wrote: > Nope, I also tested it with NIO instead of APR, same issues happen. > RewriteValve does not function as expected. Besides it, there

Question on Apache Tomcat Patches

2020-02-06 Thread Walker, Mike (GE Aviation, US)
HI All- New to apache and apache patching. I have a question. When you run an apache patch (not an upgrade or install), should the patch create a new apache folder path, or simply modify & update the existing one? For example, if I am updating apache tomcat 7 to 7_99, should I expect to see

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Hua Zhang
Nope, I also tested it with NIO instead of APR, same issues happen. RewriteValve does not function as expected. Besides it, there are also two https-443-exec executed by one request. There is definitely something wrong with Http2Protocol. And it results in this case a problem in RewriteValve.

Installing a program designed for Tomcat 5.5 on Tomcat 9

2020-02-06 Thread Shane Johnson
I am currently trying to install a program designed to operate on Win XP 32 and earlier on to a Win 10 environment. The program extracts to the Shared and Webapps folders of Tomcat 5.5 and uses a SQL database. After converting the database and installing it on SQL 2017 I added the JDBC connector

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Mark Thomas
On 06/02/2020 23:00, Mark Thomas wrote: > The issue appears to be that the following RewriteCond does not match > when the request is served over HTTP/2 (with TLS) but it does if the > request is served over HTTP/1.1 with TLS. > > RewriteCond %{HTTP_HOST} localhost > > (Note the RewriteCond

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Mark Thomas
The issue appears to be that the following RewriteCond does not match when the request is served over HTTP/2 (with TLS) but it does if the request is served over HTTP/1.1 with TLS. RewriteCond %{HTTP_HOST} localhost (Note the RewriteCond quoted at the start of this thread is invalid) I'm

Re: Question on Apache Tomcat Patches

2020-02-06 Thread Mark Thomas
On 06/02/2020 20:28, Walker, Mike (GE Aviation, US) wrote: > HI All- > > New to apache and apache patching. I have a question. When you run an > apache patch (not an upgrade or install), should the patch create a new > apache folder path, or simply modify & update the existing one? > > For

Re: Installing a program designed for Tomcat 5.5 on Tomcat 9

2020-02-06 Thread Mark Thomas
On 06/02/2020 20:32, Shane Johnson wrote: > I am currently trying to install a program designed to operate on Win XP 32 > and earlier on to a Win 10 environment. The program extracts to the Shared > and Webapps folders of Tomcat 5.5 and uses a SQL database. After converting > the database and