Re: [VOTE] Release Apache Tomcat 8.5.82

2022-08-11 Thread Mark Thomas

On 10/08/2022 22:16, Christopher Schultz wrote:

On 8/10/22 06:02, Mark Thomas wrote:


Agreed. I also spotted that adding "do.codesigning=true" would help 
repeatable builds. I'll get both of those added.


I don't think we want that to affect people trying to perform their own 
builds. It will fail every time, right? I have do.codesigning=true in 
~/build.properties which should be sufficient for Tomcat release managers.


It shouldn't fail. I was thinking of adding "do.codesigning=true" in 
build.properties.release. The builds are repeatable (assuming the 
timezone issue is fixed) so inserting the detached signature should work.



2. Require UTC.


Can that be done on the CLI for a single process on Windows? It will 
likely work for *NIX no problem. I use a semi-dedicated Windows VM 
for building releases, so I have no problem just switching it to UTC.


I'm not sure. Figuring that out is next on my TODO list. I'd really 
like to make this part of the Ant build script if I can though.


+1

I also really need to switch to building natively on my Mac because 
the whole VM thing is really cramping my style. :)


That should be doable. From memory, wine required a little hoop 
jumping to get working but it didn't take too long.


It's the wine thing that's really stopping me. Ironically, I already 
have Crossover (which is paid-for wine) installed and it would be nice 
it I could just use that, but my guess is it would be enough of a PITA 
to get working that I should just install Vanilla wine and use that.


You might be surprised. The hassle (for me) was getting the initial 
configuration right to run wine in 64-bit mode on MacOS. The build "just 
worked". I was pleasantly surprised when I was working on repeatable 
builds that used wine on Linux to find that the NSIS output was 
identical with no configuration tweaks required.




3. Find a way to force Ant to use a specific timezone.


-Duser.timezone?


That should work. We could require that to be used on the command 
line. I was hoping to find a way to set that within the script so the 
release manager still just has to do a "ant release".


Put it in pre-release, and stash it into build.properties.release?


Agreed. I'm trying to figure out exactly what to put in there.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat 8.5.82

2022-08-11 Thread Konstantin Kolinko
чт, 11 авг. 2022 г. в 05:21, Han Li :
>
>
>
> > 2022年8月11日 06:52,Konstantin Kolinko  写道:
> >
> > ср, 10 авг. 2022 г. в 13:25, Han Li  > >:
> >>
> >> Mark,
> >>
> >> Can I make a suggestion related to the ant build script. Can we add two 
> >> properties to set the values of ` -Duser.language` and `-Duser.country`, 
> >> because in the course of my testing I found that some of the unit test 
> >> assertions are in English, but there may be cases where the values are 
> >> converted by sm, e.g. Chinese.
> >> Just like this:
> >> Assert.assertEquals("ok”,x);
> >> The variable x becomes "好" after passing through the StringManager.
> >>
> >> So this makes it a bit inconvenient for non-English speaking developers to 
> >> test. I avoid this problem by adding a statement to build.xml each time I 
> >> run a test.
> >> 
> >> 
> >>
> >> So I was wondering if we could dynamically set these two values via 
> >> build.properties
> >>
> >> Thanks,
> >>
> >> Han
> >
> > I think that such tests are just broken and require fixing.
> >
> > E.g. get an instance of StringManager and read the expected message from it.
> >
> >
> > Maybe we can add -Duser.language=zh -Duser.country=CN to ANT_OPTS in
> > some Buildbot configurations, to be able to detect such tests.
>
> Sorry, my explanation may be confusing.
>
> Let me explain why with a concrete unit test. Just like this:
> org.apache.catalina.valves.TestErrorReportValve#testBug53071
>
> ```
> Assert.assertTrue(res.toString().contains("Message " +
> ErrorServlet.ERROR_TEXT + ""));
> ```
> org.apache.catalina.valves.ErrorReportValve#report
> ```
> sb.append("");
> sb.append(smClient.getString("errorReportValve.message"));
> sb.append(" ");
> ```
> Since the local of my OS is zh-CN, the response contains `信息  ` 
> instead of `Message ', so I’m trying to avoid this by changing 
> user.language and user.country.
> Unfortunately, I can’t find any way to do this at the moment, so I have to 
> manually modify the build.xml.
>

1. I think that you could add a request header

Accept-Language: en-US

using the variant of getUrl() call that accepts a "reqHead" map.

In TomcatBaseTest:
public static int getUrl(String path, ByteChunk out, Map> reqHead,
Map> resHead) throws IOException {

2. Alternatively, using StringManager:

StringManager smClient = StringManager.getManager(
Constants.Package, request.getLocales());

where Constants is org.apache.catalina.valves.Constants

ServletRequest.getLocales() is documented as:
 * header. If the client request doesn't provide an Accept-Language header,
 * this method returns an Enumeration containing one
 * Locale, the default locale for the server.



3. BTW, I was faxing a similar failure3 years ago,
https://github.com/apache/tomcat/commit/1758f6460a8e8fbf38b88385860379a4424cc66b

Time flies fast...


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat 8.5.82

2022-08-11 Thread Han Li



> 2022年8月11日 21:02,Konstantin Kolinko  写道:
> 
> чт, 11 авг. 2022 г. в 05:21, Han Li :
>> 
>> 
>> 
>>> 2022年8月11日 06:52,Konstantin Kolinko  写道:
>>> 
>>> ср, 10 авг. 2022 г. в 13:25, Han Li >> >:
 
 Mark,
 
 Can I make a suggestion related to the ant build script. Can we add two 
 properties to set the values of ` -Duser.language` and `-Duser.country`, 
 because in the course of my testing I found that some of the unit test 
 assertions are in English, but there may be cases where the values are 
 converted by sm, e.g. Chinese.
 Just like this:
 Assert.assertEquals("ok”,x);
 The variable x becomes "好" after passing through the StringManager.
 
 So this makes it a bit inconvenient for non-English speaking developers to 
 test. I avoid this problem by adding a statement to build.xml each time I 
 run a test.
 
 
 
 So I was wondering if we could dynamically set these two values via 
 build.properties
 
 Thanks,
 
 Han
>>> 
>>> I think that such tests are just broken and require fixing.
>>> 
>>> E.g. get an instance of StringManager and read the expected message from it.
>>> 
>>> 
>>> Maybe we can add -Duser.language=zh -Duser.country=CN to ANT_OPTS in
>>> some Buildbot configurations, to be able to detect such tests.
>> 
>> Sorry, my explanation may be confusing.
>> 
>> Let me explain why with a concrete unit test. Just like this:
>> org.apache.catalina.valves.TestErrorReportValve#testBug53071
>> 
>> ```
>> Assert.assertTrue(res.toString().contains("Message " +
>>ErrorServlet.ERROR_TEXT + ""));
>> ```
>> org.apache.catalina.valves.ErrorReportValve#report
>> ```
>> sb.append("");
>> sb.append(smClient.getString("errorReportValve.message"));
>> sb.append(" ");
>> ```
>> Since the local of my OS is zh-CN, the response contains `信息  
>> ` instead of `Message ', so I’m trying to avoid this by 
>> changing user.language and user.country.
>> Unfortunately, I can’t find any way to do this at the moment, so I have to 
>> manually modify the build.xml.
>> 
> 



> 1. I think that you could add a request header
> 
> Accept-Language: en-US
> 
> using the variant of getUrl() call that accepts a "reqHead" map.
> 
> In TomcatBaseTest:
>public static int getUrl(String path, ByteChunk out, Map List> reqHead,
>Map> resHead) throws IOException {
> 

I’ve tried to do this and `en_US` does not work properly, `en` does. For 
reasons I think I already know.

I will propose a BZ to describe this failure test and a PR to fix it.


> 2. Alternatively, using StringManager:
> 
>StringManager smClient = StringManager.getManager(
>Constants.Package, request.getLocales());
> 
> where Constants is org.apache.catalina.valves.Constants
> 
> ServletRequest.getLocales() is documented as:
> * header. If the client request doesn't provide an Accept-Language header,
> * this method returns an Enumeration containing one
> * Locale, the default locale for the server.

Surprisingly, based on your suggestion, I found another bug suspected to belong 
to StringManager.

I will propose another BZ to describe  it.
> 
> 
> 
> 3. BTW, I was faxing a similar failure3 years ago,
> https://github.com/apache/tomcat/commit/1758f6460a8e8fbf38b88385860379a4424cc66b
> 
> Time flies fast...

Thank you for all the work you do!

Thanks,
Han
> 
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66206] New: TestErrorReportValve test is failing on a non-English PC

2022-08-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66206

Bug ID: 66206
   Summary: TestErrorReportValve test is failing on a non-English
PC
   Product: Tomcat 10
   Version: unspecified
  Hardware: PC
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: aooo...@gmail.com
  Target Milestone: --

org.apache.catalina.valves.TestErrorReportValve#testBug53071

```
Assert.assertTrue(res.toString().contains("Message " +
ErrorServlet.ERROR_TEXT + ""));
```
org.apache.catalina.valves.ErrorReportValve#report
```
sb.append("");
sb.append(smClient.getString("errorReportValve.message"));
sb.append(" ");
```
Since the local of my OS is zh-CN, the response contains `信息  `
instead of `Message ', so this test would fail.


Similar to https://bz.apache.org/bugzilla/show_bug.cgi?id=63403

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat 8.5.82

2022-08-11 Thread Christopher Schultz

Han,

On 8/11/22 10:31, Han Li wrote:




2022年8月11日 21:02,Konstantin Kolinko  写道:

чт, 11 авг. 2022 г. в 05:21, Han Li :





2022年8月11日 06:52,Konstantin Kolinko  写道:

ср, 10 авг. 2022 г. в 13:25, Han Li mailto:aooo...@gmail.com>>:


Mark,

Can I make a suggestion related to the ant build script. Can we add two 
properties to set the values of ` -Duser.language` and `-Duser.country`, 
because in the course of my testing I found that some of the unit test 
assertions are in English, but there may be cases where the values are 
converted by sm, e.g. Chinese.
Just like this:
Assert.assertEquals("ok”,x);
The variable x becomes "好" after passing through the StringManager.

So this makes it a bit inconvenient for non-English speaking developers to 
test. I avoid this problem by adding a statement to build.xml each time I run a 
test.



So I was wondering if we could dynamically set these two values via 
build.properties

Thanks,

Han


I think that such tests are just broken and require fixing.

E.g. get an instance of StringManager and read the expected message from it.


Maybe we can add -Duser.language=zh -Duser.country=CN to ANT_OPTS in
some Buildbot configurations, to be able to detect such tests.


Sorry, my explanation may be confusing.

Let me explain why with a concrete unit test. Just like this:
org.apache.catalina.valves.TestErrorReportValve#testBug53071

```
Assert.assertTrue(res.toString().contains("Message " +
ErrorServlet.ERROR_TEXT + ""));
```
org.apache.catalina.valves.ErrorReportValve#report
```
sb.append("");
sb.append(smClient.getString("errorReportValve.message"));
sb.append(" ");
```
Since the local of my OS is zh-CN, the response contains `信息  ` instead of 
`Message ', so I’m trying to avoid this by changing user.language and user.country.
Unfortunately, I can’t find any way to do this at the moment, so I have to 
manually modify the build.xml.








1. I think that you could add a request header

Accept-Language: en-US

using the variant of getUrl() call that accepts a "reqHead" map.

In TomcatBaseTest:
public static int getUrl(String path, ByteChunk out, Map> reqHead,
Map> resHead) throws IOException {



I’ve tried to do this and `en_US` does not work properly, `en` does. For 
reasons I think I already know.


Did you try en-US? These are RFC 1766 language tags which use hyphens 
and not underscores. https://www.rfc-editor.org/rfc/rfc1766



I will propose a BZ to describe this failure test and a PR to fix it.


Excellent.

-chris

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Ensure zip files use UTC times. By default zip uses local time.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 765e6d46fa Ensure zip files use UTC times. By default zip uses local 
time.
765e6d46fa is described below

commit 765e6d46faabfed04b3eb7123c9dadd41e9cb6ac
Author: Mark Thomas 
AuthorDate: Thu Aug 11 15:57:29 2022 +0100

Ensure zip files use UTC times. By default zip uses local time.
---
 build.xml  | 45 --
 .../apache/tomcat/buildutil/ForceUtcTimeZone.java  | 30 +++
 webapps/docs/changelog.xml |  8 
 3 files changed, 63 insertions(+), 20 deletions(-)

diff --git a/build.xml b/build.xml
index 586924af45..0cc7099b0c 100644
--- a/build.xml
+++ b/build.xml
@@ -252,7 +252,7 @@
 
 
 
-
+
 
   
   
@@ -1195,7 +1195,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1206,7 +1206,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1217,7 +1217,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1228,7 +1228,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1239,7 +1239,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1250,7 +1250,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1261,7 +1261,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1272,7 +1272,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1283,7 +1283,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1806,7 +1806,7 @@
 
 
 
   
 
@@ -2386,7 +2386,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -2760,7 +2760,12 @@ asf.ldap.username=${release.asfusername}
   
 
   
-  
+  
+
+
+  
 
   
 
@@ -2780,7 +2785,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2817,7 +2822,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2845,7 +2850,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2889,7 +2894,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -3041,7 +3046,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -3917,7 +3922,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
   
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -3973,7 +3978,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
 
 
   
 
diff --git a/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java 
b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
new file mode 100644
index 00..d4e4529798
--- /dev/null
+++ b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
@@ -0,0 +1,30 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.tomcat.buildutil;
+
+import java.util.TimeZone;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class ForceUtcTimeZone extends Task {
+
+@Override
+public void execute() throws BuildException {
+TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
+}
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index caea8f83bb..84e11ec9b2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,14 @@
   
 
   
+  
+
+  
+Ensure that zip archives use UTC for file modification times to ensure
+repeatable builds across time zones. (markt)
+  
+
+  
 
 
   


-

[tomcat] branch 10.0.x updated: Ensure zip files use UTC times. By default zip uses local time.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 966090094c Ensure zip files use UTC times. By default zip uses local 
time.
966090094c is described below

commit 966090094cc5fb43d2aec66704239775e031530a
Author: Mark Thomas 
AuthorDate: Thu Aug 11 15:57:29 2022 +0100

Ensure zip files use UTC times. By default zip uses local time.
---
 build.xml  | 45 --
 .../apache/tomcat/buildutil/ForceUtcTimeZone.java  | 30 +++
 webapps/docs/changelog.xml |  8 
 3 files changed, 63 insertions(+), 20 deletions(-)

diff --git a/build.xml b/build.xml
index 15dd8b1714..f4e80409c0 100644
--- a/build.xml
+++ b/build.xml
@@ -249,7 +249,7 @@
 
 
 
-
+
 
   
   
@@ -1183,7 +1183,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1194,7 +1194,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1205,7 +1205,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1216,7 +1216,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1227,7 +1227,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1238,7 +1238,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1249,7 +1249,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1260,7 +1260,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1271,7 +1271,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1781,7 +1781,7 @@
 
 
 
   
 
@@ -2347,7 +2347,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -2721,7 +2721,12 @@ asf.ldap.username=${release.asfusername}
   
 
   
-  
+  
+
+
+  
 
   
 
@@ -2741,7 +2746,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2778,7 +2783,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2806,7 +2811,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2850,7 +2855,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -3002,7 +3007,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -3872,7 +3877,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
   
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -3928,7 +3933,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
 
 
   
 
diff --git a/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java 
b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
new file mode 100644
index 00..d4e4529798
--- /dev/null
+++ b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
@@ -0,0 +1,30 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.tomcat.buildutil;
+
+import java.util.TimeZone;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class ForceUtcTimeZone extends Task {
+
+@Override
+public void execute() throws BuildException {
+TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
+}
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 444c8b1de4..c1726e38d0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,14 @@
   
 
   
+  
+
+  
+Ensure that zip archives use UTC for file modification times to ensure
+repeatable builds across time zones. (markt)
+  
+
+  
 
 
   


-

[tomcat] branch 9.0.x updated: Ensure zip files use UTC times. By default zip uses local time.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new e7a01f3e90 Ensure zip files use UTC times. By default zip uses local 
time.
e7a01f3e90 is described below

commit e7a01f3e904be44b7edfdadd7fdb05072f01b671
Author: Mark Thomas 
AuthorDate: Thu Aug 11 15:57:29 2022 +0100

Ensure zip files use UTC times. By default zip uses local time.
---
 build.xml  | 45 --
 .../apache/tomcat/buildutil/ForceUtcTimeZone.java  | 30 +++
 webapps/docs/changelog.xml |  8 
 3 files changed, 63 insertions(+), 20 deletions(-)

diff --git a/build.xml b/build.xml
index 2a2bf779bd..f36bbcecf3 100644
--- a/build.xml
+++ b/build.xml
@@ -248,7 +248,7 @@
 
 
 
-
+
 
   
   
@@ -1176,7 +1176,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1187,7 +1187,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1198,7 +1198,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1209,7 +1209,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1220,7 +1220,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1231,7 +1231,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1242,7 +1242,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1253,7 +1253,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1264,7 +1264,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1763,7 +1763,7 @@
 
 
 
   
 
@@ -2329,7 +2329,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -2703,7 +2703,12 @@ asf.ldap.username=${release.asfusername}
   
 
   
-  
+  
+
+
+  
 
   
 
@@ -2723,7 +2728,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2760,7 +2765,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2788,7 +2793,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2832,7 +2837,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2984,7 +2989,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -3844,7 +3849,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
   
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -3900,7 +3905,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
 
 
   
 
diff --git a/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java 
b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
new file mode 100644
index 00..d4e4529798
--- /dev/null
+++ b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
@@ -0,0 +1,30 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.tomcat.buildutil;
+
+import java.util.TimeZone;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class ForceUtcTimeZone extends Task {
+
+@Override
+public void execute() throws BuildException {
+TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
+}
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 11a73a1017..f2f3f6fde6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,14 @@
   
 
   
+  
+
+  
+Ensure that zip archives use UTC for file modification times to ensure
+repeatable builds across time zones. (markt)
+  
+
+  
 
 
   


---

Re: [VOTE] Release Apache Tomcat 8.5.82

2022-08-11 Thread Han Li


> 2022年8月11日 22:56,Christopher Schultz  写道:
> 
> Han,
> 
> On 8/11/22 10:31, Han Li wrote:
>>> 2022年8月11日 21:02,Konstantin Kolinko  写道:
>>> 
>>> чт, 11 авг. 2022 г. в 05:21, Han Li :
 
 
 
> 2022年8月11日 06:52,Konstantin Kolinko  写道:
> 
> ср, 10 авг. 2022 г. в 13:25, Han Li  >:
>> 
>> Mark,
>> 
>> Can I make a suggestion related to the ant build script. Can we add two 
>> properties to set the values of ` -Duser.language` and `-Duser.country`, 
>> because in the course of my testing I found that some of the unit test 
>> assertions are in English, but there may be cases where the values are 
>> converted by sm, e.g. Chinese.
>> Just like this:
>> Assert.assertEquals("ok”,x);
>> The variable x becomes "好" after passing through the StringManager.
>> 
>> So this makes it a bit inconvenient for non-English speaking developers 
>> to test. I avoid this problem by adding a statement to build.xml each 
>> time I run a test.
>> 
>> 
>> 
>> So I was wondering if we could dynamically set these two values via 
>> build.properties
>> 
>> Thanks,
>> 
>> Han
> 
> I think that such tests are just broken and require fixing.
> 
> E.g. get an instance of StringManager and read the expected message from 
> it.
> 
> 
> Maybe we can add -Duser.language=zh -Duser.country=CN to ANT_OPTS in
> some Buildbot configurations, to be able to detect such tests.
 
 Sorry, my explanation may be confusing.
 
 Let me explain why with a concrete unit test. Just like this:
 org.apache.catalina.valves.TestErrorReportValve#testBug53071
 
 ```
 Assert.assertTrue(res.toString().contains("Message " +
 ErrorServlet.ERROR_TEXT + ""));
 ```
 org.apache.catalina.valves.ErrorReportValve#report
 ```
 sb.append("");
 sb.append(smClient.getString("errorReportValve.message"));
 sb.append(" ");
 ```
 Since the local of my OS is zh-CN, the response contains `信息 
  ` instead of `Message ', so I’m trying to avoid this by 
 changing user.language and user.country.
 Unfortunately, I can’t find any way to do this at the moment, so I have to 
 manually modify the build.xml.
 
>>> 
>>> 1. I think that you could add a request header
>>> 
>>> Accept-Language: en-US
>>> 
>>> using the variant of getUrl() call that accepts a "reqHead" map.
>>> 
>>> In TomcatBaseTest:
>>> public static int getUrl(String path, ByteChunk out, Map>> List> reqHead,
>>> Map> resHead) throws IOException {
>>> 
>> I’ve tried to do this and `en_US` does not work properly, `en` does. For 
>> reasons I think I already know.

> 
> Did you try en-US? These are RFC 1766 language tags which use hyphens and not 
> underscores. https://www.rfc-editor.org/rfc/rfc1766 
> 
> 
Yes, I'm using en-US, when you asked me I thought I was using en_US, now I'm 
sure it's en-US, it's not working properly. 

Han

>> I will propose a BZ to describe this failure test and a PR to fix it.
> 
> Excellent.
> 
> -chris
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 
> 
> For additional commands, e-mail: dev-h...@tomcat.apache.org 
> 


[tomcat] branch 8.5.x updated: Increment version for next development cycle

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new bb95f44fac Increment version for next development cycle
bb95f44fac is described below

commit bb95f44fac61cbd7f047a217a6f396453f23b9d1
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:06:26 2022 +0100

Increment version for next development cycle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index aa7f2fac35..85946e1179 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -31,7 +31,7 @@
 # - Version Control Flags -
 version.major=8
 version.minor=5
-version.build=82
+version.build=83
 version.patch=0
 version.suffix=
 version.dev=-dev
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index 8d092fe390..0bb508ecfa 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=8.5.82
+maven.asf.release.deploy.version=8.5.83
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index caf4aeec6e..fe2a4411ed 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Ensure zip files use UTC times. By default zip uses local time.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 41905224c2 Ensure zip files use UTC times. By default zip uses local 
time.
41905224c2 is described below

commit 41905224c21503fda8e0619f918263b2c059f8bc
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:07:31 2022 +0100

Ensure zip files use UTC times. By default zip uses local time.
---
 build.xml  | 39 --
 .../apache/tomcat/buildutil/ForceUtcTimeZone.java  | 30 +
 webapps/docs/changelog.xml |  8 +
 3 files changed, 60 insertions(+), 17 deletions(-)

diff --git a/build.xml b/build.xml
index dee29a27aa..44d8711eef 100644
--- a/build.xml
+++ b/build.xml
@@ -257,7 +257,7 @@
 
 
 
-
+
 
   
   
@@ -909,7 +909,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -920,7 +920,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -931,7 +931,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -942,7 +942,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -953,7 +953,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -964,7 +964,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -975,7 +975,7 @@
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
   
@@ -1394,7 +1394,7 @@
 
 
 
   
 
@@ -2028,7 +2028,7 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
 
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
@@ -2409,7 +2409,12 @@ asf.ldap.username=${release.asfusername}
   
 
   
-  
+  
+
+
+  
 
   
 
@@ -2429,7 +2434,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2466,7 +2471,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2494,7 +2499,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2538,7 +2543,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -2689,7 +2694,7 @@ asf.ldap.username=${release.asfusername}
 
 
 
   
   
@@ -3466,7 +3471,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
   
 
+ modificationtime="${tstamp.iso.release}">
   
 
 
diff --git a/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java 
b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
new file mode 100644
index 00..d4e4529798
--- /dev/null
+++ b/java/org/apache/tomcat/buildutil/ForceUtcTimeZone.java
@@ -0,0 +1,30 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.tomcat.buildutil;
+
+import java.util.TimeZone;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class ForceUtcTimeZone extends Task {
+
+@Override
+public void execute() throws BuildException {
+TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
+}
+}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fe2a4411ed..44dc071d2d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Ensure that zip archives use UTC for file modification times to ensure
+repeatable builds across time zones. (markt)
+  
+
+  
 
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Correct Javadoc

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 41bf884bc0 Correct Javadoc
41bf884bc0 is described below

commit 41bf884bc0feab6e25c8e3b2071e3118bce8c03b
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:08:21 2022 +0100

Correct Javadoc
---
 java/org/apache/catalina/tribes/Channel.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index a5f6c9cb06..16b426c611 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.StringJoiner;
 import java.util.concurrent.ScheduledExecutorService;
 
+import 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -166,9 +167,8 @@ public interface Channel {
  * to trigger certain behavior. Most flags are used to trigger channel 
interceptors
  * as the message passes through the channel stack. 
  * However, there are five default flags that every channel implementation 
must implement
- * SEND_OPTIONS_ASYNCHRONOUS - Message is sent and an ACK is received when 
the message has been received and
- * processed by the recipient
- * If no ack is received, the message is not considered successful
+ * SEND_OPTIONS_ASYNCHRONOUS - Message will be placed on a queue and sent 
by a separate thread
+ * If the queue is full, behaviour depends on {@link 
MessageDispatchInterceptor#isAlwaysSend()}
  * @see #send(Member[], Serializable , int)
  * @see #send(Member[], Serializable, int, ErrorHandler)
  */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Correct Javadoc

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 062ff2b797 Correct Javadoc
062ff2b797 is described below

commit 062ff2b797e3889f9505c3de136dbff5b577332e
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:08:21 2022 +0100

Correct Javadoc
---
 java/org/apache/catalina/tribes/Channel.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index a5f6c9cb06..16b426c611 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.StringJoiner;
 import java.util.concurrent.ScheduledExecutorService;
 
+import 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -166,9 +167,8 @@ public interface Channel {
  * to trigger certain behavior. Most flags are used to trigger channel 
interceptors
  * as the message passes through the channel stack. 
  * However, there are five default flags that every channel implementation 
must implement
- * SEND_OPTIONS_ASYNCHRONOUS - Message is sent and an ACK is received when 
the message has been received and
- * processed by the recipient
- * If no ack is received, the message is not considered successful
+ * SEND_OPTIONS_ASYNCHRONOUS - Message will be placed on a queue and sent 
by a separate thread
+ * If the queue is full, behaviour depends on {@link 
MessageDispatchInterceptor#isAlwaysSend()}
  * @see #send(Member[], Serializable , int)
  * @see #send(Member[], Serializable, int, ErrorHandler)
  */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Correct Javadoc

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 926c49f29a Correct Javadoc
926c49f29a is described below

commit 926c49f29af9053f027ee5d659b07fad0e00dfe2
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:08:21 2022 +0100

Correct Javadoc
---
 java/org/apache/catalina/tribes/Channel.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index a5f6c9cb06..16b426c611 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.StringJoiner;
 import java.util.concurrent.ScheduledExecutorService;
 
+import 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -166,9 +167,8 @@ public interface Channel {
  * to trigger certain behavior. Most flags are used to trigger channel 
interceptors
  * as the message passes through the channel stack. 
  * However, there are five default flags that every channel implementation 
must implement
- * SEND_OPTIONS_ASYNCHRONOUS - Message is sent and an ACK is received when 
the message has been received and
- * processed by the recipient
- * If no ack is received, the message is not considered successful
+ * SEND_OPTIONS_ASYNCHRONOUS - Message will be placed on a queue and sent 
by a separate thread
+ * If the queue is full, behaviour depends on {@link 
MessageDispatchInterceptor#isAlwaysSend()}
  * @see #send(Member[], Serializable , int)
  * @see #send(Member[], Serializable, int, ErrorHandler)
  */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Correct Javadoc

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 5721c341ec Correct Javadoc
5721c341ec is described below

commit 5721c341ec7df565978e31291d8aeb4f40ccfd48
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:08:21 2022 +0100

Correct Javadoc
---
 java/org/apache/catalina/tribes/Channel.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/tribes/Channel.java 
b/java/org/apache/catalina/tribes/Channel.java
index e3f51bc066..14db643a32 100644
--- a/java/org/apache/catalina/tribes/Channel.java
+++ b/java/org/apache/catalina/tribes/Channel.java
@@ -18,6 +18,8 @@ package org.apache.catalina.tribes;
 
 import java.io.Serializable;
 
+import 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor;
+
 /**
  * Channel interface
  * A channel is a representation of a group of nodes all participating in some 
sort of
@@ -161,9 +163,8 @@ public interface Channel {
  * to trigger certain behavior. Most flags are used to trigger channel 
interceptors
  * as the message passes through the channel stack. 
  * However, there are five default flags that every channel implementation 
must implement
- * SEND_OPTIONS_ASYNCHRONOUS - Message is sent and an ACK is received when 
the message has been received and
- * processed by the recipient
- * If no ack is received, the message is not considered successful
+ * SEND_OPTIONS_ASYNCHRONOUS - Message will be placed on a queue and sent 
by a separate thread
+ * If the queue is full, behaviour depends on {@link 
MessageDispatchInterceptor#isAlwaysSend()}
  * @see #send(Member[], Serializable , int)
  * @see #send(Member[], Serializable, int, ErrorHandler)
  */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix IDE warnings

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new ab31d4bc60 Fix IDE warnings
ab31d4bc60 is described below

commit ab31d4bc600e739d670912bbc902f0646ab14945
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:15:06 2022 +0100

Fix IDE warnings
---
 java/org/apache/catalina/users/MemoryUserDatabase.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/catalina/users/MemoryUserDatabase.java 
b/java/org/apache/catalina/users/MemoryUserDatabase.java
index 97e36ac3b8..5044c15db9 100644
--- a/java/org/apache/catalina/users/MemoryUserDatabase.java
+++ b/java/org/apache/catalina/users/MemoryUserDatabase.java
@@ -296,6 +296,7 @@ public class MemoryUserDatabase implements UserDatabase {
 throw new IllegalArgumentException(msg);
 }
 
+@SuppressWarnings("deprecation")
 Group group = new MemoryGroup(this, groupname, description);
 readLock.lock();
 try {
@@ -321,6 +322,7 @@ public class MemoryUserDatabase implements UserDatabase {
 throw new IllegalArgumentException(msg);
 }
 
+@SuppressWarnings("deprecation")
 Role role = new MemoryRole(this, rolename, description);
 readLock.lock();
 try {
@@ -348,6 +350,7 @@ public class MemoryUserDatabase implements UserDatabase {
 throw new IllegalArgumentException(msg);
 }
 
+@SuppressWarnings("deprecation")
 User user = new MemoryUser(this, username, password, fullName);
 readLock.lock();
 try {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66207] New: StringManager#getManager(String, Enumeration) cannot return the correct value

2022-08-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66207

Bug ID: 66207
   Summary: StringManager#getManager(String,
Enumeration) cannot return the
correct value
   Product: Tomcat 10
   Version: unspecified
  Hardware: PC
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Util
  Assignee: dev@tomcat.apache.org
  Reporter: aooo...@gmail.com
  Target Milestone: --

The reason for the problem is that when the StringManager object is created,
there is a special handling where the locale is specified as ROOT when the
language of the Local is English, and finally the local of the current sm
object is set to Locale.ENGLISH.
Code snippet.
```
if (locale.getLanguage().equals(Locale.ENGLISH.getLanguage())) {
   locale = Locale.ROOT;
}

.

Locale bundleLocale = bundle.getLocale();
if (bundleLocale.equals(Locale.ROOT)) {
this.locale = Locale.ENGLISH;
} else {
this.locale = bundleLocale;
}

```
org.apache.tomcat.util.res.StringManager#getManager(java.lang.String,
java.util.Enumeration) 
There is a local comparison in this method, if it is compared with If it is the
same as the local passed in then return it, otherwise get the default local sm.
```
StringManager result = getManager(packageName, locale);
if (result.getLocale().equals(locale)) {
return result;
}
return getManager(packageName);
```

The problem lies in the comparison, which I think should be a comparison of
languages, not local objects, because Local(en) ! = Local(en-US)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Sign reproducible builds by default. The detached signature is available

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 3faf0ce54c Sign reproducible builds by default. The detached signature 
is available
3faf0ce54c is described below

commit 3faf0ce54c497e5bbce027158338511757c887c1
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:21:25 2022 +0100

Sign reproducible builds by default. The detached signature is available
---
 build.xml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/build.xml b/build.xml
index 0cc7099b0c..f0ed5714d9 100644
--- a/build.xml
+++ b/build.xml
@@ -2666,12 +2666,18 @@ skip.installer property in build.properties" />
 
 # This file was auto-generated by the pre-release Ant target
 
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
 # Ensure consistent timestamps for reproducible builds
 ant.tstamp.now.iso=${tstamp.iso.release}
 
+# Enable insertion of detatched signatures into the Windows installer.
+do.codesigning=true
+
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Sign reproducible builds by default. The detached signature is available

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 522c6b8d28 Sign reproducible builds by default. The detached signature 
is available
522c6b8d28 is described below

commit 522c6b8d2801087568ccb96107d242836b9b8715
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:21:25 2022 +0100

Sign reproducible builds by default. The detached signature is available
---
 build.xml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/build.xml b/build.xml
index f4e80409c0..d11ca5e096 100644
--- a/build.xml
+++ b/build.xml
@@ -2627,12 +2627,18 @@ skip.installer property in build.properties" />
 
 # This file was auto-generated by the pre-release Ant target
 
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
 # Ensure consistent timestamps for reproducible builds
 ant.tstamp.now.iso=${tstamp.iso.release}
 
+# Enable insertion of detatched signatures into the Windows installer.
+do.codesigning=true
+
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Sign reproducible builds by default. The detached signature is available

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 2ceef9aea7 Sign reproducible builds by default. The detached signature 
is available
2ceef9aea7 is described below

commit 2ceef9aea7cf26c964ecfa37addbc37e7abdbd3c
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:21:25 2022 +0100

Sign reproducible builds by default. The detached signature is available
---
 build.xml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/build.xml b/build.xml
index f36bbcecf3..acc49b4b91 100644
--- a/build.xml
+++ b/build.xml
@@ -2609,12 +2609,18 @@ skip.installer property in build.properties" />
 
 # This file was auto-generated by the pre-release Ant target
 
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
 # Ensure consistent timestamps for reproducible builds
 ant.tstamp.now.iso=${tstamp.iso.release}
 
+# Enable insertion of detatched signatures into the Windows installer.
+do.codesigning=true
+
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Sign reproducible builds by default. The detached signature is available

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new c6b50a54f2 Sign reproducible builds by default. The detached signature 
is available
c6b50a54f2 is described below

commit c6b50a54f2f09fca7356fde964315394e1a9bab6
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:21:25 2022 +0100

Sign reproducible builds by default. The detached signature is available
---
 build.xml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/build.xml b/build.xml
index 44d8711eef..0776b38788 100644
--- a/build.xml
+++ b/build.xml
@@ -2308,12 +2308,18 @@ skip.installer property in build.properties" />
 
 # This file was auto-generated by the pre-release Ant target
 
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
 # Ensure consistent timestamps for reproducible builds
 ant.tstamp.now.iso=${tstamp.iso.release}
 
+# Enable insertion of detatched signatures into the Windows installer.
+do.codesigning=true
+
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Consistent use of period at the end of sentences in comments.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 82e864a947 Consistent use of period at the end of sentences in 
comments.
82e864a947 is described below

commit 82e864a9471c3e44efbeefb69552f3e5072171fe
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:22:41 2022 +0100

Consistent use of period at the end of sentences in comments.
---
 build.xml | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index f0ed5714d9..5c6b6e07a8 100644
--- a/build.xml
+++ b/build.xml
@@ -2664,7 +2664,7 @@ skip.installer property in build.properties" />
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Any unwanted settings may be over-ridden in a build.properties file located
 # in the same directory as this file.
@@ -2672,7 +2672,7 @@ skip.installer property in build.properties" />
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
-# Ensure consistent timestamps for reproducible builds
+# Ensure consistent timestamps for reproducible builds.
 ant.tstamp.now.iso=${tstamp.iso.release}
 
 # Enable insertion of detatched signatures into the Windows installer.
@@ -2681,7 +2681,7 @@ do.codesigning=true
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file
-# manifests, as part of the build process
+# manifests, as part of the build process.
 #
 # Apache Ant:  ${ant.version}
 #
@@ -2690,7 +2690,7 @@ do.codesigning=true
 # Java Version:${java.vm.version}
 
 # The following is provided for information only. Builds will be repeatable
-# whether or not the build ennvironment in consistent with this information
+# whether or not the build ennvironment in consistent with this information.
 #
 # OS:  ${os.arch} ${os.name} ${os.version}
 # File encoding:   ${file.encoding}
@@ -2714,15 +2714,15 @@ do.codesigning=true
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Remove "-dev" from the version since this is not a development release.
 
maven.asf.release.deploy.version=${version.major}.${version.minor}.${version.build}${version.suffix}
 
-# Re-use the same GPG executable
+# Re-use the same GPG executable.
 gpg.exec=${gpg.exec}
 
-# Set the user name to use to upload the artefacts to Nexus
+# Set the user name to use to upload the artefacts to Nexus.
 asf.ldap.username=${release.asfusername}
 
 

[tomcat] branch 10.0.x updated: Consistent use of period at the end of sentences in comments.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 93e189f1f0 Consistent use of period at the end of sentences in 
comments.
93e189f1f0 is described below

commit 93e189f1f0130b055f0db129947259ad2df87cab
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:22:41 2022 +0100

Consistent use of period at the end of sentences in comments.
---
 build.xml | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index d11ca5e096..b92b46517c 100644
--- a/build.xml
+++ b/build.xml
@@ -2625,7 +2625,7 @@ skip.installer property in build.properties" />
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Any unwanted settings may be over-ridden in a build.properties file located
 # in the same directory as this file.
@@ -2633,7 +2633,7 @@ skip.installer property in build.properties" />
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
-# Ensure consistent timestamps for reproducible builds
+# Ensure consistent timestamps for reproducible builds.
 ant.tstamp.now.iso=${tstamp.iso.release}
 
 # Enable insertion of detatched signatures into the Windows installer.
@@ -2642,7 +2642,7 @@ do.codesigning=true
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file
-# manifests, as part of the build process
+# manifests, as part of the build process.
 #
 # Apache Ant:  ${ant.version}
 #
@@ -2651,7 +2651,7 @@ do.codesigning=true
 # Java Version:${java.vm.version}
 
 # The following is provided for information only. Builds will be repeatable
-# whether or not the build ennvironment in consistent with this information
+# whether or not the build ennvironment in consistent with this information.
 #
 # OS:  ${os.arch} ${os.name} ${os.version}
 # File encoding:   ${file.encoding}
@@ -2675,15 +2675,15 @@ do.codesigning=true
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Remove "-dev" from the version since this is not a development release.
 
maven.asf.release.deploy.version=${version.major}.${version.minor}.${version.build}${version.suffix}
 
-# Re-use the same GPG executable
+# Re-use the same GPG executable.
 gpg.exec=${gpg.exec}
 
-# Set the user name to use to upload the artefacts to Nexus
+# Set the user name to use to upload the artefacts to Nexus.
 asf.ldap.username=${release.asfusername}
 
 

[tomcat] branch 9.0.x updated: Consistent use of period at the end of sentences in comments.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new cf3164757b Consistent use of period at the end of sentences in 
comments.
cf3164757b is described below

commit cf3164757bbe52494e29fd3fb26a6b91a3454317
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:22:41 2022 +0100

Consistent use of period at the end of sentences in comments.
---
 build.xml | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index acc49b4b91..bfe0309ce3 100644
--- a/build.xml
+++ b/build.xml
@@ -2607,7 +2607,7 @@ skip.installer property in build.properties" />
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Any unwanted settings may be over-ridden in a build.properties file located
 # in the same directory as this file.
@@ -2615,7 +2615,7 @@ skip.installer property in build.properties" />
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
-# Ensure consistent timestamps for reproducible builds
+# Ensure consistent timestamps for reproducible builds.
 ant.tstamp.now.iso=${tstamp.iso.release}
 
 # Enable insertion of detatched signatures into the Windows installer.
@@ -2624,7 +2624,7 @@ do.codesigning=true
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file
-# manifests, as part of the build process
+# manifests, as part of the build process.
 #
 # Apache Ant:  ${ant.version}
 #
@@ -2633,7 +2633,7 @@ do.codesigning=true
 # Java Version:${java.vm.version}
 
 # The following is provided for information only. Builds will be repeatable
-# whether or not the build ennvironment in consistent with this information
+# whether or not the build ennvironment in consistent with this information.
 #
 # OS:  ${os.arch} ${os.name} ${os.version}
 # File encoding:   ${file.encoding}
@@ -2657,15 +2657,15 @@ do.codesigning=true
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Remove "-dev" from the version since this is not a development release.
 
maven.asf.release.deploy.version=${version.major}.${version.minor}.${version.build}${version.suffix}
 
-# Re-use the same GPG executable
+# Re-use the same GPG executable.
 gpg.exec=${gpg.exec}
 
-# Set the user name to use to upload the artefacts to Nexus
+# Set the user name to use to upload the artefacts to Nexus.
 asf.ldap.username=${release.asfusername}
 
 

[tomcat] branch 8.5.x updated: Consistent use of period at the end of sentences in comments.

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new e2bc41a941 Consistent use of period at the end of sentences in 
comments.
e2bc41a941 is described below

commit e2bc41a94189b5325f020ca0f6f1fc070aa19c2b
Author: Mark Thomas 
AuthorDate: Thu Aug 11 16:22:41 2022 +0100

Consistent use of period at the end of sentences in comments.
---
 build.xml | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index 0776b38788..3291920a06 100644
--- a/build.xml
+++ b/build.xml
@@ -2306,7 +2306,7 @@ skip.installer property in build.properties" />
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Any unwanted settings may be over-ridden in a build.properties file located
 # in the same directory as this file.
@@ -2314,7 +2314,7 @@ skip.installer property in build.properties" />
 # Set the version-dev to "" (empty string) as this is not a development 
release.
 version.dev=
 
-# Ensure consistent timestamps for reproducible builds
+# Ensure consistent timestamps for reproducible builds.
 ant.tstamp.now.iso=${tstamp.iso.release}
 
 # Enable insertion of detatched signatures into the Windows installer.
@@ -2323,7 +2323,7 @@ do.codesigning=true
 # Reproducible builds require the use of the build tools defined below. The
 # vendors (where appropriate) and versions must match exactly for a 
reproducible
 # build since this data is embedded in various files, particularly JAR file
-# manifests, as part of the build process
+# manifests, as part of the build process.
 #
 # Apache Ant:  ${ant.version}
 #
@@ -2332,7 +2332,7 @@ do.codesigning=true
 # Java Version:${java.vm.version}
 
 # The following is provided for information only. Builds will be repeatable
-# whether or not the build ennvironment in consistent with this information
+# whether or not the build ennvironment in consistent with this information.
 #
 # OS:  ${os.arch} ${os.name} ${os.version}
 # File encoding:   ${file.encoding}
@@ -2356,15 +2356,15 @@ do.codesigning=true
 # limitations under the License.
 # -
 
-# This file was auto-generated by the pre-release Ant target
+# This file was auto-generated by the pre-release Ant target.
 
 # Remove "-dev" from the version since this is not a development release.
 
maven.asf.release.deploy.version=${version.major}.${version.minor}.${version.build}${version.suffix}
 
-# Re-use the same GPG executable
+# Re-use the same GPG executable.
 gpg.exec=${gpg.exec}
 
-# Set the user name to use to upload the artefacts to Nexus
+# Set the user name to use to upload the artefacts to Nexus.
 asf.ldap.username=${release.asfusername}
 
 

[GitHub] [tomcat] aooohan opened a new pull request, #536: Bugfix for 66206 - TestErrorReportValve test is failing on a non-English PC

2022-08-11 Thread GitBox


aooohan opened a new pull request, #536:
URL: https://github.com/apache/tomcat/pull/536

   fix [BZ66206](https://bz.apache.org/bugzilla/show_bug.cgi?id=66206)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] markt-asf merged pull request #536: Bugfix for 66206 - TestErrorReportValve test is failing on a non-English PC

2022-08-11 Thread GitBox


markt-asf merged PR #536:
URL: https://github.com/apache/tomcat/pull/536


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix BZ66206

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 56908dd1ec Fix BZ66206
56908dd1ec is described below

commit 56908dd1ec6e5a1fa46804a48463536a5f36c507
Author: lihan 
AuthorDate: Thu Aug 11 22:51:19 2022 +0800

Fix BZ66206
---
 test/org/apache/catalina/valves/TestErrorReportValve.java | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java 
b/test/org/apache/catalina/valves/TestErrorReportValve.java
index 620ff21134..5de7f9ac5e 100644
--- a/test/org/apache/catalina/valves/TestErrorReportValve.java
+++ b/test/org/apache/catalina/valves/TestErrorReportValve.java
@@ -17,6 +17,10 @@
 package org.apache.catalina.valves;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import jakarta.servlet.AsyncContext;
 import jakarta.servlet.RequestDispatcher;
@@ -51,7 +55,12 @@ public class TestErrorReportValve extends TomcatBaseTest {
 
 tomcat.start();
 
-ByteChunk res = getUrl("http://localhost:"; + getPort());
+ByteChunk res = new ByteChunk();
+List values = new ArrayList<>();
+values.add("en");
+Map> reqHead = new HashMap<>();
+reqHead.put("Accept-Language", values);
+getUrl("http://localhost:"; + getPort(), res, reqHead, null);
 
 Assert.assertTrue(res.toString().contains("Message " +
 ErrorServlet.ERROR_TEXT + ""));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] markt-asf commented on pull request #536: Bugfix for 66206 - TestErrorReportValve test is failing on a non-English PC

2022-08-11 Thread GitBox


markt-asf commented on PR #536:
URL: https://github.com/apache/tomcat/pull/536#issuecomment-1212162451

   LGTM. Thanks for the bug report and PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Fix BZ66206

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 4624aa4516 Fix BZ66206
4624aa4516 is described below

commit 4624aa451646c7152fc521f4716d8d44fe5ffc3c
Author: lihan 
AuthorDate: Thu Aug 11 22:51:19 2022 +0800

Fix BZ66206
---
 test/org/apache/catalina/valves/TestErrorReportValve.java | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java 
b/test/org/apache/catalina/valves/TestErrorReportValve.java
index 620ff21134..5de7f9ac5e 100644
--- a/test/org/apache/catalina/valves/TestErrorReportValve.java
+++ b/test/org/apache/catalina/valves/TestErrorReportValve.java
@@ -17,6 +17,10 @@
 package org.apache.catalina.valves;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import jakarta.servlet.AsyncContext;
 import jakarta.servlet.RequestDispatcher;
@@ -51,7 +55,12 @@ public class TestErrorReportValve extends TomcatBaseTest {
 
 tomcat.start();
 
-ByteChunk res = getUrl("http://localhost:"; + getPort());
+ByteChunk res = new ByteChunk();
+List values = new ArrayList<>();
+values.add("en");
+Map> reqHead = new HashMap<>();
+reqHead.put("Accept-Language", values);
+getUrl("http://localhost:"; + getPort(), res, reqHead, null);
 
 Assert.assertTrue(res.toString().contains("Message " +
 ErrorServlet.ERROR_TEXT + ""));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix BZ66206

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3191b920d7 Fix BZ66206
3191b920d7 is described below

commit 3191b920d7159effbdb7d7f428fab7bef2687396
Author: lihan 
AuthorDate: Thu Aug 11 22:51:19 2022 +0800

Fix BZ66206
---
 test/org/apache/catalina/valves/TestErrorReportValve.java | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java 
b/test/org/apache/catalina/valves/TestErrorReportValve.java
index 0157f6f480..dc51de94fc 100644
--- a/test/org/apache/catalina/valves/TestErrorReportValve.java
+++ b/test/org/apache/catalina/valves/TestErrorReportValve.java
@@ -17,6 +17,10 @@
 package org.apache.catalina.valves;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import javax.servlet.AsyncContext;
 import javax.servlet.RequestDispatcher;
@@ -51,7 +55,12 @@ public class TestErrorReportValve extends TomcatBaseTest {
 
 tomcat.start();
 
-ByteChunk res = getUrl("http://localhost:"; + getPort());
+ByteChunk res = new ByteChunk();
+List values = new ArrayList<>();
+values.add("en");
+Map> reqHead = new HashMap<>();
+reqHead.put("Accept-Language", values);
+getUrl("http://localhost:"; + getPort(), res, reqHead, null);
 
 Assert.assertTrue(res.toString().contains("Message " +
 ErrorServlet.ERROR_TEXT + ""));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix BZ66206

2022-08-11 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d537cd55e6 Fix BZ66206
d537cd55e6 is described below

commit d537cd55e62e4c0745284c21d4bda601ebb92860
Author: lihan 
AuthorDate: Thu Aug 11 22:51:19 2022 +0800

Fix BZ66206
---
 test/org/apache/catalina/valves/TestErrorReportValve.java | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java 
b/test/org/apache/catalina/valves/TestErrorReportValve.java
index da0a99fdd0..512008098c 100644
--- a/test/org/apache/catalina/valves/TestErrorReportValve.java
+++ b/test/org/apache/catalina/valves/TestErrorReportValve.java
@@ -17,6 +17,10 @@
 package org.apache.catalina.valves;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import javax.servlet.AsyncContext;
 import javax.servlet.RequestDispatcher;
@@ -48,7 +52,12 @@ public class TestErrorReportValve extends TomcatBaseTest {
 
 tomcat.start();
 
-ByteChunk res = getUrl("http://localhost:"; + getPort());
+ByteChunk res = new ByteChunk();
+List values = new ArrayList<>();
+values.add("en");
+Map> reqHead = new HashMap<>();
+reqHead.put("Accept-Language", values);
+getUrl("http://localhost:"; + getPort(), res, reqHead, null);
 
 Assert.assertTrue(res.toString().contains("Message " +
 ErrorServlet.ERROR_TEXT + ""));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66206] TestErrorReportValve test is failing on a non-English PC

2022-08-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66206

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
- 10.1.x for 10.1.0-M18 onwards
- 10.0.x for 10.0.24 onwards
-  9.0.x for  9.0.66 onwards
-  8.5.x for  8.5.83 onwards

Thanks for the report and the PR.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66209] New: CPU regression when classpath Bloom filters are active

2022-08-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66209

Bug ID: 66209
   Summary: CPU regression when classpath Bloom filters are active
   Product: Tomcat 9
   Version: 9.0.46
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: jeng...@amazon.com
  Target Milestone: -

Created attachment 38363
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38363&action=edit
Patch with one-line fix and relevant unit test

On applications with large classpaths, enabling UseBloomFilterForArchives
tremendously accelerates classpath scans by performing early exits on each jar,
rather than accessing the manifest.  Unfortunately the underlying Bloom filters
can be cleaned at runtime by AbstractArchiveResourceSet.gc(), which forces the
next classpath scan to reinitialize the entire set of bloom filters.  On our
large application we are therefore observing both huge improvements to startup,
and huge cpu regressions while handling traffic.

I've attached a patch containing a one-line fix, as well as a unit test that
detects the error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66210] New: TestAbstractAjpProcessor&TestFlowControl tests are failing on a non-English PC

2022-08-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66210

Bug ID: 66210
   Summary: TestAbstractAjpProcessor&TestFlowControl tests are
failing on a non-English PC
   Product: Tomcat 10
   Version: unspecified
  Hardware: PC
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: aooo...@gmail.com
  Target Milestone: --

Simliar to https://bz.apache.org/bugzilla/show_bug.cgi?id=66206

I re-ran the tests on a non-English PC and found a total of two unit tests
which are failing, because of expected value was hard-coded as en and actual
value was not. 

BUT `org.apache.coyote.http2.TestHttp2Limits#testSettingsOverheadLimits`,I
don't know know how to fix the problem of it.


Another problematic test is following one:
org.apache.coyote.http2.TestFlowControl#testNotFound

Testcase: testNotFound[0: loop [0], useAsyncIO[false]] took 0.462 sec
FAILED
expected:<...ontent-language]-[zh[]]
3-Header-[content-...> but was:<...ontent-language]-[zh[-CN]]
3-Header-[content-...>
junit.framework.AssertionFailedError: expected:<...ontent-language]-[zh[]]
3-Header-[content-...> but was:<...ontent-language]-[zh[-CN]]
3-Header-[content-...>

The reason for this is that we should get the default local through
StringManager, not directly through Locale.getDefault(), and the toLanguageTag
method is used when setting the local of request, so we should be consistent
here as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] aooohan opened a new pull request, #537: Bugfix for 66210 - TestAbstractAjpProcessor&TestFlowControl tests are failing on a non-English PC

2022-08-11 Thread GitBox


aooohan opened a new pull request, #537:
URL: https://github.com/apache/tomcat/pull/537

   Fix [BZ66210](https://bz.apache.org/bugzilla/show_bug.cgi?id=66210)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org