[tomcat] branch 8.5.x updated: Minor optimization
This is an automated email from the ASF dual-hosted git repository. lihan 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 745a0b9ddf Minor optimization 745a0b9ddf is described below commit 745a0b9ddf5afcdec6c5c3f5a5c0c65b3fe4124e Author: lihan AuthorDate: Wed Aug 9 16:42:11 2023 +0800 Minor optimization --- java/org/apache/catalina/mapper/Mapper.java | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/java/org/apache/catalina/mapper/Mapper.java b/java/org/apache/catalina/mapper/Mapper.java index fff38137d3..d2d3b4635e 100644 --- a/java/org/apache/catalina/mapper/Mapper.java +++ b/java/org/apache/catalina/mapper/Mapper.java @@ -1324,16 +1324,18 @@ public final class Mapper { len = end - start; } for (int i = 0; (i < len) && (result == 0); i++) { -if (c[i + start] > compareTo.charAt(i)) { +char nameChar = c[i + start]; +char compareToChar = compareTo.charAt(i); +if (nameChar > compareToChar) { result = 1; -} else if (c[i + start] < compareTo.charAt(i)) { +} else if (nameChar < compareToChar) { result = -1; } } if (result == 0) { -if (compareTo.length() > (end - start)) { +if (len > (end - start)) { result = -1; -} else if (compareTo.length() < (end - start)) { +} else if (len < (end - start)) { result = 1; } } @@ -1353,16 +1355,18 @@ public final class Mapper { len = end - start; } for (int i = 0; (i < len) && (result == 0); i++) { -if (Ascii.toLower(c[i + start]) > Ascii.toLower(compareTo.charAt(i))) { +int nameLower = Ascii.toLower(c[i + start]); +int compareLower = Ascii.toLower(compareTo.charAt(i)); +if (nameLower > compareLower) { result = 1; -} else if (Ascii.toLower(c[i + start]) < Ascii.toLower(compareTo.charAt(i))) { +} else if (nameLower < compareLower) { result = -1; } } if (result == 0) { -if (compareTo.length() > (end - start)) { +if (len > (end - start)) { result = -1; -} else if (compareTo.length() < (end - start)) { +} else if (len < (end - start)) { result = 1; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix typo.
This is an automated email from the ASF dual-hosted git repository. lihan 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 c1388b3ed0 Fix typo. c1388b3ed0 is described below commit c1388b3ed08f7a72bc5193d5c5242087a9e73e7d Author: lihan AuthorDate: Thu Aug 10 11:15:06 2023 +0800 Fix typo. --- java/org/apache/catalina/connector/Request.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 8ec5f187c0..f43d8c835d 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -3055,7 +3055,7 @@ public class Request implements HttpServletRequest { parameters.setQueryStringCharset(charset); } // Note: If !useBodyEncodingForURI, the query string encoding is -// that set towards the start of CoyoyeAdapter.service() +// that set towards the start of CoyoteAdapter.service() parameters.handleQueryParameters(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Fix typo.
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 3ca902a025 Fix typo. 3ca902a025 is described below commit 3ca902a025ae88c7b195658019e1cc0a54b9f5b4 Author: lihan AuthorDate: Thu Aug 10 11:15:06 2023 +0800 Fix typo. (cherry picked from commit c1388b3ed08f7a72bc5193d5c5242087a9e73e7d) --- java/org/apache/catalina/connector/Request.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 0f2ee5c046..6954351c92 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -3103,7 +3103,7 @@ public class Request implements HttpServletRequest { parameters.setQueryStringCharset(charset); } // Note: If !useBodyEncodingForURI, the query string encoding is -// that set towards the start of CoyoyeAdapter.service() +// that set towards the start of CoyoteAdapter.service() parameters.handleQueryParameters(); - 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 typo.
This is an automated email from the ASF dual-hosted git repository. lihan 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 29ef6e183f Fix typo. 29ef6e183f is described below commit 29ef6e183f956d58eba5820b0b463a990aff4928 Author: lihan AuthorDate: Thu Aug 10 11:15:06 2023 +0800 Fix typo. (cherry picked from commit c1388b3ed08f7a72bc5193d5c5242087a9e73e7d) --- java/org/apache/catalina/connector/Request.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index be6aed055f..2ed59f22a0 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -3162,7 +3162,7 @@ public class Request implements HttpServletRequest { parameters.setQueryStringCharset(charset); } // Note: If !useBodyEncodingForURI, the query string encoding is -// that set towards the start of CoyoyeAdapter.service() +// that set towards the start of CoyoteAdapter.service() parameters.handleQueryParameters(); - 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 typo.
This is an automated email from the ASF dual-hosted git repository. lihan 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 fd416efaa5 Fix typo. fd416efaa5 is described below commit fd416efaa5b78cf6de5d97ba8a62ddd0a31e9339 Author: lihan AuthorDate: Thu Aug 10 11:15:06 2023 +0800 Fix typo. (cherry picked from commit c1388b3ed08f7a72bc5193d5c5242087a9e73e7d) --- java/org/apache/catalina/connector/Request.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 1adc04e392..41f8573f1f 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -3177,7 +3177,7 @@ public class Request implements HttpServletRequest { parameters.setQueryStringCharset(charset); } // Note: If !useBodyEncodingForURI, the query string encoding is -// that set towards the start of CoyoyeAdapter.service() +// that set towards the start of CoyoteAdapter.service() parameters.handleQueryParameters(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix a regression in 6353e786
This is an automated email from the ASF dual-hosted git repository. lihan 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 3a92f6a0bf Fix a regression in 6353e786 3a92f6a0bf is described below commit 3a92f6a0bf3c73451a5fcc0b1d6de6fe5a6bb5b2 Author: lihan AuthorDate: Thu Aug 10 15:48:56 2023 +0800 Fix a regression in 6353e786 --- java/org/apache/catalina/mapper/Mapper.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/mapper/Mapper.java b/java/org/apache/catalina/mapper/Mapper.java index b1cfa8033b..b8708b9c45 100644 --- a/java/org/apache/catalina/mapper/Mapper.java +++ b/java/org/apache/catalina/mapper/Mapper.java @@ -1332,7 +1332,8 @@ public final class Mapper { private static int compare(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1346,9 +1347,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } @@ -1363,7 +1364,8 @@ public final class Mapper { private static int compareIgnoreCase(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1377,9 +1379,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Fix a regression in 6353e786
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 4d3f1bdbf3 Fix a regression in 6353e786 4d3f1bdbf3 is described below commit 4d3f1bdbf3e7a626edfea97f1b2853ee27076264 Author: lihan AuthorDate: Thu Aug 10 15:48:56 2023 +0800 Fix a regression in 6353e786 --- java/org/apache/catalina/mapper/Mapper.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/mapper/Mapper.java b/java/org/apache/catalina/mapper/Mapper.java index b1c87e1070..f73e7429b5 100644 --- a/java/org/apache/catalina/mapper/Mapper.java +++ b/java/org/apache/catalina/mapper/Mapper.java @@ -1314,7 +1314,8 @@ public final class Mapper { private static int compare(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1328,9 +1329,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } @@ -1345,7 +1346,8 @@ public final class Mapper { private static int compareIgnoreCase(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1359,9 +1361,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } - 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 a regression in 6353e786
This is an automated email from the ASF dual-hosted git repository. lihan 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 96ee000b9a Fix a regression in 6353e786 96ee000b9a is described below commit 96ee000b9ad61d123bf3889e5152f668a36006ee Author: lihan AuthorDate: Thu Aug 10 15:48:56 2023 +0800 Fix a regression in 6353e786 --- java/org/apache/catalina/mapper/Mapper.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/mapper/Mapper.java b/java/org/apache/catalina/mapper/Mapper.java index 70e428b45b..0a5690704b 100644 --- a/java/org/apache/catalina/mapper/Mapper.java +++ b/java/org/apache/catalina/mapper/Mapper.java @@ -1320,7 +1320,8 @@ public final class Mapper { private static int compare(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1334,9 +1335,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } @@ -1351,7 +1352,8 @@ public final class Mapper { private static int compareIgnoreCase(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1365,9 +1367,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } - 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 a regression in 6353e786
This is an automated email from the ASF dual-hosted git repository. lihan 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 5623b08fac Fix a regression in 6353e786 5623b08fac is described below commit 5623b08fac963514c6793fda0aca743a876924a3 Author: lihan AuthorDate: Thu Aug 10 15:48:56 2023 +0800 Fix a regression in 6353e786 --- java/org/apache/catalina/mapper/Mapper.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/mapper/Mapper.java b/java/org/apache/catalina/mapper/Mapper.java index d2d3b4635e..a1f9d19257 100644 --- a/java/org/apache/catalina/mapper/Mapper.java +++ b/java/org/apache/catalina/mapper/Mapper.java @@ -1319,7 +1319,8 @@ public final class Mapper { private static int compare(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1333,9 +1334,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } @@ -1350,7 +1351,8 @@ public final class Mapper { private static int compareIgnoreCase(CharChunk name, int start, int end, String compareTo) { int result = 0; char[] c = name.getBuffer(); -int len = compareTo.length(); +int compareLen = compareTo.length(); +int len = compareLen; if ((end - start) < len) { len = end - start; } @@ -1364,9 +1366,9 @@ public final class Mapper { } } if (result == 0) { -if (len > (end - start)) { +if (compareLen > (end - start)) { result = -1; -} else if (len < (end - start)) { +} else if (compareLen < (end - start)) { result = 1; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix javadoc and documentation.
This is an automated email from the ASF dual-hosted git repository. lihan 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 ca095d52c9 Fix javadoc and documentation. ca095d52c9 is described below commit ca095d52c98c2e25005990a9ef02240a823f0334 Author: lihan AuthorDate: Fri Sep 1 10:43:45 2023 +0800 Fix javadoc and documentation. Update the default value of 'socket.processorCache' and 'socket.eventCache' in the documentation and javadoc. And remove 'socket.keyCache' from the AJP documentation. --- java/org/apache/tomcat/util/net/SocketProperties.java | 8 webapps/docs/config/ajp.xml | 13 +++-- webapps/docs/config/http.xml | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 1cdb2c6302..b91d54f0e2 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -36,7 +36,7 @@ public class SocketProperties { /** * Enable/disable socket processor cache, this bounded cache stores * SocketProcessor objects to reduce GC - * Default is 500 + * Default is 0 * -1 is unlimited * 0 is disabled */ @@ -45,7 +45,7 @@ public class SocketProperties { /** * Enable/disable poller event cache, this bounded cache stores * PollerEvent objects to reduce GC for the poller - * Default is 500 + * Default is 0 * -1 is unlimited * 0 is disabled * >0 the max number of objects to keep in cache. @@ -78,13 +78,13 @@ public class SocketProperties { /** * The application read buffer size in bytes. - * Default value is rxBufSize + * Default value is 8192 */ protected int appReadBufSize = 8192; /** * The application write buffer size in bytes - * Default value is txBufSize + * Default value is 8192 */ protected int appWriteBufSize = 8192; diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index 6eda243d89..bc85a734b3 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -720,21 +720,14 @@ (int)Tomcat will cache SocketProcessor objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are --1 for unlimited cache and 0 for no cache. - - - -(int)Tomcat will cache KeyAttachment objects to reduce garbage -collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. (int)Tomcat will cache PollerEvent objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. @@ -794,7 +787,7 @@ (int)Tomcat will cache SocketProcessor objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml index 5bc3c4a6e4..9cbab65964 100644 --- a/webapps/docs/config/http.xml +++ b/webapps/docs/config/http.xml @@ -1008,7 +1008,7 @@ (int)Tomcat will cache SocketProcessor objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Fix javadoc and documentation.
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 5d6e0ea5c8 Fix javadoc and documentation. 5d6e0ea5c8 is described below commit 5d6e0ea5c86c43110e3efeeb4d2cc110131c8b3a Author: lihan AuthorDate: Fri Sep 1 10:43:45 2023 +0800 Fix javadoc and documentation. Update the default value of 'socket.processorCache' and 'socket.eventCache' in the documentation and javadoc. And remove 'socket.keyCache' from the AJP documentation. (cherry picked from commit ca095d52c98c2e25005990a9ef02240a823f0334) --- java/org/apache/tomcat/util/net/SocketProperties.java | 8 webapps/docs/config/ajp.xml | 13 +++-- webapps/docs/config/http.xml | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 1cdb2c6302..b91d54f0e2 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -36,7 +36,7 @@ public class SocketProperties { /** * Enable/disable socket processor cache, this bounded cache stores * SocketProcessor objects to reduce GC - * Default is 500 + * Default is 0 * -1 is unlimited * 0 is disabled */ @@ -45,7 +45,7 @@ public class SocketProperties { /** * Enable/disable poller event cache, this bounded cache stores * PollerEvent objects to reduce GC for the poller - * Default is 500 + * Default is 0 * -1 is unlimited * 0 is disabled * >0 the max number of objects to keep in cache. @@ -78,13 +78,13 @@ public class SocketProperties { /** * The application read buffer size in bytes. - * Default value is rxBufSize + * Default value is 8192 */ protected int appReadBufSize = 8192; /** * The application write buffer size in bytes - * Default value is txBufSize + * Default value is 8192 */ protected int appWriteBufSize = 8192; diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index b704c9e733..aff9f44a6a 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -724,21 +724,14 @@ (int)Tomcat will cache SocketProcessor objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are --1 for unlimited cache and 0 for no cache. - - - -(int)Tomcat will cache KeyAttachment objects to reduce garbage -collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. (int)Tomcat will cache PollerEvent objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. @@ -798,7 +791,7 @@ (int)Tomcat will cache SocketProcessor objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml index 6f71e36dd0..30101b80d8 100644 --- a/webapps/docs/config/http.xml +++ b/webapps/docs/config/http.xml @@ -1033,7 +1033,7 @@ (int)Tomcat will cache SocketProcessor objects to reduce garbage collection. The integer value specifies how many objects to keep in the -cache at most. The default is 500. Other values are +cache at most. The default is 0. Other values are -1 for unlimited cache and 0 for no cache. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Refactor Request::getSession() to invoke Request::getSession(false) internally. (#648)
This is an automated email from the ASF dual-hosted git repository. lihan 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 d0b655d831 Refactor Request::getSession() to invoke Request::getSession(false) internally. (#648) d0b655d831 is described below commit d0b655d8316bcef78b84255a9d8ee2f7cd78d649 Author: xxeol2 AuthorDate: Tue Sep 5 15:07:23 2023 +0900 Refactor Request::getSession() to invoke Request::getSession(false) internally. (#648) Refactor Request::getSession() to invoke Request::getSession(false) internally to eliminate code redundancy. --- java/org/apache/catalina/connector/Request.java | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 82fea929f8..a9ba406047 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -2288,12 +2288,7 @@ public class Request implements HttpServletRequest { */ @Override public HttpSession getSession() { -Session session = doGetSession(true); -if (session == null) { -return null; -} - -return session.getSession(); +return getSession(true); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new a95d18861c Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648) a95d18861c is described below commit a95d18861ccaa30a4264bcf97fb3e8a2e0f06de9 Author: xxeol2 AuthorDate: Tue Sep 5 15:07:23 2023 +0900 Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648) Refactor Request::getSession() to invoke Request::getSession(true) internally to eliminate code redundancy. (cherry picked from commit d0b655d8316bcef78b84255a9d8ee2f7cd78d649) --- java/org/apache/catalina/connector/Request.java | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index a0748b1774..a407ecdb79 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -2366,12 +2366,7 @@ public class Request implements HttpServletRequest { */ @Override public HttpSession getSession() { -Session session = doGetSession(true); -if (session == null) { -return null; -} - -return session.getSession(); +return getSession(true); } - 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: Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648)
This is an automated email from the ASF dual-hosted git repository. lihan 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 e51b6709bf Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648) e51b6709bf is described below commit e51b6709bf50c59ea2a77111337abb9c114393ff Author: xxeol2 AuthorDate: Tue Sep 5 15:07:23 2023 +0900 Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648) Refactor Request::getSession() to invoke Request::getSession(true) internally to eliminate code redundancy. (cherry picked from commit d0b655d8316bcef78b84255a9d8ee2f7cd78d649) --- java/org/apache/catalina/connector/Request.java | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 619dfc34fd..a38aad0d23 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -2404,12 +2404,7 @@ public class Request implements HttpServletRequest { */ @Override public HttpSession getSession() { -Session session = doGetSession(true); -if (session == null) { -return null; -} - -return session.getSession(); +return getSession(true); } - 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: Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648)
This is an automated email from the ASF dual-hosted git repository. lihan 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 2cd8eff7b5 Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648) 2cd8eff7b5 is described below commit 2cd8eff7b587504d1afc89b8af6d92862e605904 Author: xxeol2 AuthorDate: Tue Sep 5 15:07:23 2023 +0900 Refactor Request::getSession() to invoke Request::getSession(true) internally. (#648) Refactor Request::getSession() to invoke Request::getSession(true) internally to eliminate code redundancy. (cherry picked from commit d0b655d8316bcef78b84255a9d8ee2f7cd78d649) --- java/org/apache/catalina/connector/Request.java | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index cebd50640c..40ec9d9c07 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -2395,12 +2395,7 @@ public class Request implements HttpServletRequest { */ @Override public HttpSession getSession() { -Session session = doGetSession(true); -if (session == null) { -return null; -} - -return session.getSession(); +return getSession(true); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Update documentation (#668)
This is an automated email from the ASF dual-hosted git repository. lihan 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 268b7cc8de Update documentation (#668) 268b7cc8de is described below commit 268b7cc8de7f59f22a2d2aac4df47be7dce192b6 Author: marcorobiati <82662790+marcorobi...@users.noreply.github.com> AuthorDate: Mon Sep 11 04:38:13 2023 +0200 Update documentation (#668) * Update graal.xml JMX is now supported as a experimental feature https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5#8501 and the previous github issue related to this was closed long ago as resolved https://github.com/oracle/graal/issues/2103 * Update index.xml remove non existent page and and added missing one --- webapps/docs/graal.xml | 2 -- webapps/docs/index.xml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/webapps/docs/graal.xml b/webapps/docs/graal.xml index 385db171ae..d427898c07 100644 --- a/webapps/docs/graal.xml +++ b/webapps/docs/graal.xml @@ -209,8 +209,6 @@ mvn package Missing items for better Tomcat functionality: - https://github.com/oracle/graal/issues/2103";>JMX: -The usual monitoring and management is not usable java.util.logging LogManager: Configuration through a system property is not implemented, so standard java.util.logging must be used instead of JULI diff --git a/webapps/docs/index.xml b/webapps/docs/index.xml index ee5067cd25..e41a1b2649 100644 --- a/webapps/docs/index.xml +++ b/webapps/docs/index.xml @@ -120,8 +120,6 @@ Apache Tomcat, and using many of the Apache Tomcat features. Configuring virtual hosting in Apache Tomcat. Advanced IO - Extensions available over regular, blocking IO. -Additional Components - -Obtaining additional, optional components. Using Tomcat libraries with Maven - Obtaining Tomcat jars through Maven. Security Considerations - @@ -138,6 +136,8 @@ Apache Tomcat, and using many of the Apache Tomcat features. Using the regexp based rewrite valve for conditional URL and host rewrite. CDI and JAX-RS support - Configuring CDI,JAX-RS and Eclipse Microprofile support. +AOT compilation support - +Ahead of Time compilation support with GraalVM/Native Image. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Update documentation (#668)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 2270b0f231 Update documentation (#668) 2270b0f231 is described below commit 2270b0f2310cc6b3ed4c45cda47c7424c5829028 Author: marcorobiati <82662790+marcorobi...@users.noreply.github.com> AuthorDate: Mon Sep 11 04:38:13 2023 +0200 Update documentation (#668) * Update graal.xml JMX is now supported as a experimental feature https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5#8501 and the previous github issue related to this was closed long ago as resolved https://github.com/oracle/graal/issues/2103 * Update index.xml remove non existent page and and added missing one (cherry picked from commit 268b7cc8de7f59f22a2d2aac4df47be7dce192b6) --- webapps/docs/graal.xml | 2 -- webapps/docs/index.xml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/webapps/docs/graal.xml b/webapps/docs/graal.xml index 385db171ae..d427898c07 100644 --- a/webapps/docs/graal.xml +++ b/webapps/docs/graal.xml @@ -209,8 +209,6 @@ mvn package Missing items for better Tomcat functionality: - https://github.com/oracle/graal/issues/2103";>JMX: -The usual monitoring and management is not usable java.util.logging LogManager: Configuration through a system property is not implemented, so standard java.util.logging must be used instead of JULI diff --git a/webapps/docs/index.xml b/webapps/docs/index.xml index 835097d5e6..1853658d73 100644 --- a/webapps/docs/index.xml +++ b/webapps/docs/index.xml @@ -124,8 +124,6 @@ Apache Tomcat, and using many of the Apache Tomcat features. Configuring virtual hosting in Apache Tomcat. Advanced IO - Extensions available over regular, blocking IO. -Additional Components - -Obtaining additional, optional components. Using Tomcat libraries with Maven - Obtaining Tomcat jars through Maven. Security Considerations - @@ -142,6 +140,8 @@ Apache Tomcat, and using many of the Apache Tomcat features. Using the regexp based rewrite valve for conditional URL and host rewrite. CDI and JAX-RS support - Configuring CDI,JAX-RS and Eclipse Microprofile support. +AOT compilation support - +Ahead of Time compilation support with GraalVM/Native Image. - 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: Update documentation (#668)
This is an automated email from the ASF dual-hosted git repository. lihan 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 deb371f854 Update documentation (#668) deb371f854 is described below commit deb371f854561fa50598fb57d05ecc35bf5dcc79 Author: marcorobiati <82662790+marcorobi...@users.noreply.github.com> AuthorDate: Mon Sep 11 04:38:13 2023 +0200 Update documentation (#668) * Update graal.xml JMX is now supported as a experimental feature https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5#8501 and the previous github issue related to this was closed long ago as resolved https://github.com/oracle/graal/issues/2103 * Update index.xml remove non existent page and and added missing one (cherry picked from commit 268b7cc8de7f59f22a2d2aac4df47be7dce192b6) --- webapps/docs/graal.xml | 2 -- webapps/docs/index.xml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/webapps/docs/graal.xml b/webapps/docs/graal.xml index 7b776e2119..4534159707 100644 --- a/webapps/docs/graal.xml +++ b/webapps/docs/graal.xml @@ -209,8 +209,6 @@ mvn package Missing items for better Tomcat functionality: - https://github.com/oracle/graal/issues/2103";>JMX: -The usual monitoring and management is not usable java.util.logging LogManager: Configuration through a system property is not implemented, so standard java.util.logging must be used instead of JULI diff --git a/webapps/docs/index.xml b/webapps/docs/index.xml index 947ac14376..1ea22a717d 100644 --- a/webapps/docs/index.xml +++ b/webapps/docs/index.xml @@ -125,8 +125,6 @@ Apache Tomcat, and using many of the Apache Tomcat features. Configuring virtual hosting in Apache Tomcat. Advanced IO - Extensions available over regular, blocking IO. -Additional Components - -Obtaining additional, optional components. Using Tomcat libraries with Maven - Obtaining Tomcat jars through Maven. Security Considerations - @@ -143,6 +141,8 @@ Apache Tomcat, and using many of the Apache Tomcat features. Using the regexp based rewrite valve for conditional URL and host rewrite. CDI and JAX-RS support - Configuring CDI,JAX-RS and Eclipse Microprofile support. +AOT compilation support - +Ahead of Time compilation support with GraalVM/Native Image. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Update tool-wrapper.bat (#665)
This is an automated email from the ASF dual-hosted git repository. lihan 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 a6acd986aa Update tool-wrapper.bat (#665) a6acd986aa is described below commit a6acd986aa7b415c6390d578318054f51efbe876 Author: ChrissW-R1 AuthorDate: Mon Sep 11 10:33:51 2023 +0200 Update tool-wrapper.bat (#665) Solved issue with spaces in path --- bin/tool-wrapper.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat index 64f38a02a1..e9320d81bc 100755 --- a/bin/tool-wrapper.bat +++ b/bin/tool-wrapper.bat @@ -85,6 +85,6 @@ shift goto setArgs :doneSetArgs -%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% +"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% :end - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Update tool-wrapper.bat (#665)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new ea6930eae7 Update tool-wrapper.bat (#665) ea6930eae7 is described below commit ea6930eae76921868e634705ebb881db96fff3ef Author: ChrissW-R1 AuthorDate: Mon Sep 11 10:33:51 2023 +0200 Update tool-wrapper.bat (#665) Solved issue with spaces in path (cherry picked from commit a6acd986aa7b415c6390d578318054f51efbe876) --- bin/tool-wrapper.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat index 64f38a02a1..e9320d81bc 100755 --- a/bin/tool-wrapper.bat +++ b/bin/tool-wrapper.bat @@ -85,6 +85,6 @@ shift goto setArgs :doneSetArgs -%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% +"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% :end - 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: Update tool-wrapper.bat (#665)
This is an automated email from the ASF dual-hosted git repository. lihan 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 f2facc3ab4 Update tool-wrapper.bat (#665) f2facc3ab4 is described below commit f2facc3ab45da07fa65a17012b851b648c6f5eaa Author: lihan AuthorDate: Mon Sep 11 16:35:36 2023 +0800 Update tool-wrapper.bat (#665) Solved issue with spaces in path --- bin/tool-wrapper.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat index 94de4fe326..5d91999fa5 100755 --- a/bin/tool-wrapper.bat +++ b/bin/tool-wrapper.bat @@ -105,6 +105,6 @@ shift goto setArgs :doneSetArgs -%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% +"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% :end - 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: Update tool-wrapper.bat (#665)
This is an automated email from the ASF dual-hosted git repository. lihan 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 c61037a8c3 Update tool-wrapper.bat (#665) c61037a8c3 is described below commit c61037a8c32ce45e4bfa160a23682d00a3cbfb0a Author: lihan AuthorDate: Mon Sep 11 16:36:14 2023 +0800 Update tool-wrapper.bat (#665) Solved issue with spaces in path --- bin/tool-wrapper.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat index 94de4fe326..5d91999fa5 100755 --- a/bin/tool-wrapper.bat +++ b/bin/tool-wrapper.bat @@ -105,6 +105,6 @@ shift goto setArgs :doneSetArgs -%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% +"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% :end - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Fix BZ 67611 - Correct the download link in BUILDING.txt
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new de99971200 Fix BZ 67611 - Correct the download link in BUILDING.txt de99971200 is described below commit de999712000741a42cf4bcd91a8cc43ea2a9a5d8 Author: lihan AuthorDate: Fri Oct 6 12:24:44 2023 +0800 Fix BZ 67611 - Correct the download link in BUILDING.txt https://bz.apache.org/bugzilla/show_bug.cgi?id=67611 --- BUILDING.txt | 2 +- webapps/docs/changelog.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BUILDING.txt b/BUILDING.txt index 5eee8234cc..799b579ba8 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -104,7 +104,7 @@ package. * Source packages can be downloaded from: -https://tomcat.apache.org/download-@version_ma...@0.cgi +https://tomcat.apache.org/download-@VERSION_MAJOR@.cgi The location where the source has been placed will be further referred as ${tomcat.source}. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 8ea4205594..4042c974bf 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -195,6 +195,9 @@ Update Commons Pool to 2.12.0. (markt) + +67611: Correct the download link in BUILDING.txt. (lihan) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix BZ 67611 - Correct the download link in BUILDING.txt
This is an automated email from the ASF dual-hosted git repository. lihan 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 a0605e86a8 Fix BZ 67611 - Correct the download link in BUILDING.txt a0605e86a8 is described below commit a0605e86a8ebcc39e0b72d82a2e2b1840855069c Author: lihan AuthorDate: Fri Oct 6 12:24:44 2023 +0800 Fix BZ 67611 - Correct the download link in BUILDING.txt https://bz.apache.org/bugzilla/show_bug.cgi?id=67611 --- BUILDING.txt | 2 +- webapps/docs/changelog.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BUILDING.txt b/BUILDING.txt index 5eee8234cc..799b579ba8 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -104,7 +104,7 @@ package. * Source packages can be downloaded from: -https://tomcat.apache.org/download-@version_ma...@0.cgi +https://tomcat.apache.org/download-@VERSION_MAJOR@.cgi The location where the source has been placed will be further referred as ${tomcat.source}. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index de2e082745..0a8fd38b2b 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -208,6 +208,9 @@ Update Commons Pool to 2.12.0. (markt) + +67611: Correct the download link in BUILDING.txt. (lihan) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix typo.
This is an automated email from the ASF dual-hosted git repository. lihan 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 2fab725c2e Fix typo. 2fab725c2e is described below commit 2fab725c2e8f7d7653617a25e831d3be4726eee0 Author: lihan AuthorDate: Tue Oct 10 09:52:29 2023 +0800 Fix typo. --- java/org/apache/catalina/valves/FilterValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/valves/FilterValve.java b/java/org/apache/catalina/valves/FilterValve.java index 2ac4ace086..2f47845322 100644 --- a/java/org/apache/catalina/valves/FilterValve.java +++ b/java/org/apache/catalina/valves/FilterValve.java @@ -203,7 +203,7 @@ public class FilterValve extends ValveBase implements FilterConfig { return executor; } else { throw new UnsupportedOperationException( -"This ServletContet is not really meant to be used."); +"This ServletContext is not really meant to be used."); } } }); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Correct exception message.
This is an automated email from the ASF dual-hosted git repository. lihan 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 76ac8d1b55 Correct exception message. 76ac8d1b55 is described below commit 76ac8d1b55ba5c2ca08827d793bcf6e20d6c9e4e Author: lihan AuthorDate: Wed Oct 25 09:53:56 2023 +0800 Correct exception message. --- java/org/apache/tomcat/util/net/jsse/PEMFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java b/java/org/apache/tomcat/util/net/jsse/PEMFile.java index b051c539ea..b3f60ce0db 100644 --- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java +++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java @@ -406,7 +406,7 @@ public class PEMFile { byte[] oidPRF = p.parseOIDAsBytes(); String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF)); if (prf == null) { -throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", prf)); +throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", HexUtils.toHexString(oidPRF))); } p.parseNull(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Correct exception message.
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 9ced1b8edb Correct exception message. 9ced1b8edb is described below commit 9ced1b8edbac631f47b976e2867b9c4e7d76534c Author: lihan AuthorDate: Wed Oct 25 09:53:56 2023 +0800 Correct exception message. (cherry picked from commit 76ac8d1b55ba5c2ca08827d793bcf6e20d6c9e4e) --- java/org/apache/tomcat/util/net/jsse/PEMFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java b/java/org/apache/tomcat/util/net/jsse/PEMFile.java index b051c539ea..b3f60ce0db 100644 --- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java +++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java @@ -406,7 +406,7 @@ public class PEMFile { byte[] oidPRF = p.parseOIDAsBytes(); String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF)); if (prf == null) { -throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", prf)); +throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", HexUtils.toHexString(oidPRF))); } p.parseNull(); - 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 exception message.
This is an automated email from the ASF dual-hosted git repository. lihan 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 bec7a51d7f Correct exception message. bec7a51d7f is described below commit bec7a51d7fc3fb913c755b258169d1816b77bea5 Author: lihan AuthorDate: Wed Oct 25 09:53:56 2023 +0800 Correct exception message. (cherry picked from commit 76ac8d1b55ba5c2ca08827d793bcf6e20d6c9e4e) --- java/org/apache/tomcat/util/net/jsse/PEMFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java b/java/org/apache/tomcat/util/net/jsse/PEMFile.java index b051c539ea..b3f60ce0db 100644 --- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java +++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java @@ -406,7 +406,7 @@ public class PEMFile { byte[] oidPRF = p.parseOIDAsBytes(); String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF)); if (prf == null) { -throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", prf)); +throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", HexUtils.toHexString(oidPRF))); } p.parseNull(); - 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 exception message.
This is an automated email from the ASF dual-hosted git repository. lihan 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 9663a8fad0 Correct exception message. 9663a8fad0 is described below commit 9663a8fad03790107e7ebce8f747270b2a508e1c Author: lihan AuthorDate: Wed Oct 25 09:53:56 2023 +0800 Correct exception message. (cherry picked from commit 76ac8d1b55ba5c2ca08827d793bcf6e20d6c9e4e) --- java/org/apache/tomcat/util/net/jsse/PEMFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java b/java/org/apache/tomcat/util/net/jsse/PEMFile.java index 71db800680..a136bef6a6 100644 --- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java +++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java @@ -404,7 +404,7 @@ public class PEMFile { byte[] oidPRF = p.parseOIDAsBytes(); String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF)); if (prf == null) { -throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", prf)); +throw new NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", HexUtils.toHexString(oidPRF))); } p.parseNull(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix typo.
This is an automated email from the ASF dual-hosted git repository. lihan 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 7400288181 Fix typo. 7400288181 is described below commit 74002881816ff47dbfa0430962f12a63a93891f4 Author: lihan AuthorDate: Thu Oct 26 10:26:10 2023 +0800 Fix typo. --- java/jakarta/el/RecordELResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/jakarta/el/RecordELResolver.java b/java/jakarta/el/RecordELResolver.java index 55ba2f5baf..0f21bb1e38 100644 --- a/java/jakarta/el/RecordELResolver.java +++ b/java/jakarta/el/RecordELResolver.java @@ -23,7 +23,7 @@ import java.util.Objects; * Defines property resolution behavior on instances of {@link Record}. * * The resolver handles base objects of type {@link Record}. It accepts any non-{@code null} object as a property and coerces it to a - * String using {@link Object#toString()}. The property string is used to find find an accessor method for a field + * String using {@link Object#toString()}. The property string is used to find an accessor method for a field * with the same name. * * This resolver is always read-only since {@link Record}s are always read-only. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671)
This is an automated email from the ASF dual-hosted git repository. lihan 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 3ef8fb6fb6 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) 3ef8fb6fb6 is described below commit 3ef8fb6fb6fda60dce304ba4842a5b32dc28b459 Author: chenggwang <90715678+chenggw...@users.noreply.github.com> AuthorDate: Thu Oct 26 10:33:14 2023 +0800 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) * Fix NioChannel and Nio2Channel's toString() throwing NPE in some cases NioChannel's toString() causes NioEndpoint's setSocketOptions method to throw a NullPointerException in some scenarios (e.g. idea breakpoint debugging). --- java/org/apache/tomcat/util/net/Nio2Channel.java | 2 +- java/org/apache/tomcat/util/net/NioChannel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java index 603c43f416..be816eb280 100644 --- a/java/org/apache/tomcat/util/net/Nio2Channel.java +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java @@ -136,7 +136,7 @@ public class Nio2Channel implements AsynchronousByteChannel { @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } @Override diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java index d263ce9ae6..6ddf5637f0 100644 --- a/java/org/apache/tomcat/util/net/NioChannel.java +++ b/java/org/apache/tomcat/util/net/NioChannel.java @@ -185,7 +185,7 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } public int getOutboundRemaining() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.1.x updated: Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 011860ca74 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) 011860ca74 is described below commit 011860ca7461fcb26cb464f751792db7bb2886da Author: chenggwang <90715678+chenggw...@users.noreply.github.com> AuthorDate: Thu Oct 26 10:33:14 2023 +0800 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) * Fix NioChannel and Nio2Channel's toString() throwing NPE in some cases NioChannel's toString() causes NioEndpoint's setSocketOptions method to throw a NullPointerException in some scenarios (e.g. idea breakpoint debugging). (cherry picked from commit 3ef8fb6fb6fda60dce304ba4842a5b32dc28b459) --- java/org/apache/tomcat/util/net/Nio2Channel.java | 2 +- java/org/apache/tomcat/util/net/NioChannel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java index 603c43f416..be816eb280 100644 --- a/java/org/apache/tomcat/util/net/Nio2Channel.java +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java @@ -136,7 +136,7 @@ public class Nio2Channel implements AsynchronousByteChannel { @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } @Override diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java index d263ce9ae6..6ddf5637f0 100644 --- a/java/org/apache/tomcat/util/net/NioChannel.java +++ b/java/org/apache/tomcat/util/net/NioChannel.java @@ -185,7 +185,7 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } public int getOutboundRemaining() { - 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 Nio/Nio2Channel's toString() throwing NPE in some cases (#671)
This is an automated email from the ASF dual-hosted git repository. lihan 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 ea7db77568 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) ea7db77568 is described below commit ea7db77568b293ad371969d9ee034b39a668b8b9 Author: chenggwang <90715678+chenggw...@users.noreply.github.com> AuthorDate: Thu Oct 26 10:33:14 2023 +0800 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) * Fix NioChannel and Nio2Channel's toString() throwing NPE in some cases NioChannel's toString() causes NioEndpoint's setSocketOptions method to throw a NullPointerException in some scenarios (e.g. idea breakpoint debugging). (cherry picked from commit 3ef8fb6fb6fda60dce304ba4842a5b32dc28b459) --- java/org/apache/tomcat/util/net/Nio2Channel.java | 2 +- java/org/apache/tomcat/util/net/NioChannel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java index a2612fd0c1..181f12913c 100644 --- a/java/org/apache/tomcat/util/net/Nio2Channel.java +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java @@ -136,7 +136,7 @@ public class Nio2Channel implements AsynchronousByteChannel { @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } @Override diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java index 8e3cb4f0e1..96493ed75a 100644 --- a/java/org/apache/tomcat/util/net/NioChannel.java +++ b/java/org/apache/tomcat/util/net/NioChannel.java @@ -203,7 +203,7 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } public int getOutboundRemaining() { - 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 Nio/Nio2Channel's toString() throwing NPE in some cases (#671)
This is an automated email from the ASF dual-hosted git repository. lihan 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 9b3c28da7e Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) 9b3c28da7e is described below commit 9b3c28da7ec8ddbd721b127f7f3b0a7d475ab797 Author: chenggwang <90715678+chenggw...@users.noreply.github.com> AuthorDate: Thu Oct 26 10:33:14 2023 +0800 Fix Nio/Nio2Channel's toString() throwing NPE in some cases (#671) * Fix NioChannel and Nio2Channel's toString() throwing NPE in some cases NioChannel's toString() causes NioEndpoint's setSocketOptions method to throw a NullPointerException in some scenarios (e.g. idea breakpoint debugging). (cherry picked from commit 3ef8fb6fb6fda60dce304ba4842a5b32dc28b459) --- java/org/apache/tomcat/util/net/Nio2Channel.java | 2 +- java/org/apache/tomcat/util/net/NioChannel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java index a2612fd0c1..181f12913c 100644 --- a/java/org/apache/tomcat/util/net/Nio2Channel.java +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java @@ -136,7 +136,7 @@ public class Nio2Channel implements AsynchronousByteChannel { @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } @Override diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java index 8e3cb4f0e1..96493ed75a 100644 --- a/java/org/apache/tomcat/util/net/NioChannel.java +++ b/java/org/apache/tomcat/util/net/NioChannel.java @@ -203,7 +203,7 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering @Override public String toString() { -return super.toString() + ":" + sc.toString(); +return super.toString() + ":" + sc; } public int getOutboundRemaining() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1903658 - /tomcat/site/trunk/xdocs/whoweare.xml
Author: lihan Date: Wed Aug 24 10:25:26 2022 New Revision: 1903658 URL: http://svn.apache.org/viewvc?rev=1903658&view=rev Log: add new committer - Han Li Modified: tomcat/site/trunk/xdocs/whoweare.xml Modified: tomcat/site/trunk/xdocs/whoweare.xml URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/whoweare.xml?rev=1903658&r1=1903657&r2=1903658&view=diff == --- tomcat/site/trunk/xdocs/whoweare.xml (original) +++ tomcat/site/trunk/xdocs/whoweare.xml Wed Aug 24 10:25:26 2022 @@ -154,6 +154,9 @@ A complete list of all the Apache Commit Huxing Zhang (huxing at apache.org) +Han Li (lihan at apache.org) + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1903660 - /tomcat/site/trunk/docs/whoweare.html
Author: lihan Date: Wed Aug 24 11:50:33 2022 New Revision: 1903660 URL: http://svn.apache.org/viewvc?rev=1903660&view=rev Log: build whoweare.html docs Modified: tomcat/site/trunk/docs/whoweare.html Modified: tomcat/site/trunk/docs/whoweare.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/whoweare.html?rev=1903660&r1=1903659&r2=1903660&view=diff == --- tomcat/site/trunk/docs/whoweare.html (original) +++ tomcat/site/trunk/docs/whoweare.html Wed Aug 24 11:50:33 2022 @@ -144,6 +144,9 @@ A complete list of all the Apache Commit Huxing Zhang (huxing at apache.org) +Han Li (lihan at apache.org) + + Emeritus PMC members http://www.apache.org/foundation/glossary.html#Emeritus";> - 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 typo
This is an automated email from the ASF dual-hosted git repository. lihan 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 6167517453 Fix typo 6167517453 is described below commit 616751745353b2c4cd9300971d4b3e1a233dc3a5 Author: lihan AuthorDate: Wed Aug 24 21:38:13 2022 +0800 Fix typo --- java/org/apache/catalina/core/StandardEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/StandardEngine.java b/java/org/apache/catalina/core/StandardEngine.java index 6aa496baa1..9aa3945cbf 100644 --- a/java/org/apache/catalina/core/StandardEngine.java +++ b/java/org/apache/catalina/core/StandardEngine.java @@ -67,7 +67,7 @@ public class StandardEngine extends ContainerBase implements Engine { super(); pipeline.setBasic(new StandardEngineValve()); -/* Set the jmvRoute using the system property jvmRoute */ +/* Set the jvmRoute using the system property jvmRoute */ try { setJvmRoute(System.getProperty("jvmRoute")); } catch(Exception ex) { - 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 typo
This is an automated email from the ASF dual-hosted git repository. lihan 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 481e70daed Fix typo 481e70daed is described below commit 481e70daed1120ab0504dc8f2c1cc0bc47ee2445 Author: lihan AuthorDate: Wed Aug 24 21:38:13 2022 +0800 Fix typo --- java/org/apache/catalina/core/StandardEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/StandardEngine.java b/java/org/apache/catalina/core/StandardEngine.java index c29892b6bf..6d072773cd 100644 --- a/java/org/apache/catalina/core/StandardEngine.java +++ b/java/org/apache/catalina/core/StandardEngine.java @@ -65,7 +65,7 @@ public class StandardEngine extends ContainerBase implements Engine { super(); pipeline.setBasic(new StandardEngineValve()); -/* Set the jmvRoute using the system property jvmRoute */ +/* Set the jvmRoute using the system property jvmRoute */ try { setJvmRoute(System.getProperty("jvmRoute")); } catch(Exception ex) { - 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 typo
This is an automated email from the ASF dual-hosted git repository. lihan 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 816b1f295b Fix typo 816b1f295b is described below commit 816b1f295b2b438c33c3856ed18a5c70a74d34a0 Author: lihan AuthorDate: Wed Aug 24 21:38:13 2022 +0800 Fix typo --- java/org/apache/catalina/core/StandardEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/StandardEngine.java b/java/org/apache/catalina/core/StandardEngine.java index 6aa496baa1..9aa3945cbf 100644 --- a/java/org/apache/catalina/core/StandardEngine.java +++ b/java/org/apache/catalina/core/StandardEngine.java @@ -67,7 +67,7 @@ public class StandardEngine extends ContainerBase implements Engine { super(); pipeline.setBasic(new StandardEngineValve()); -/* Set the jmvRoute using the system property jvmRoute */ +/* Set the jvmRoute using the system property jvmRoute */ try { setJvmRoute(System.getProperty("jvmRoute")); } catch(Exception ex) { - 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 BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output
This is an automated email from the ASF dual-hosted git repository. lihan 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 62136a2e82 Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. 62136a2e82 is described below commit 62136a2e8222a6a111c2495010faff8ed62b412b Author: lihan AuthorDate: Wed Aug 17 13:58:14 2022 +0800 Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. --- .../tribes/group/TestGroupChannelOptionFlag.java | 24 -- .../catalina/valves/TestErrorReportValve.java | 20 -- .../coyote/ajp/TestAbstractAjpProcessor.java | 14 ++--- test/org/apache/coyote/ajp/TesterAjpMessage.java | 21 --- test/org/apache/coyote/http2/TestFlowControl.java | 6 -- test/org/apache/coyote/http2/TestHttp2Limits.java | 5 - 6 files changed, 59 insertions(+), 31 deletions(-) diff --git a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java index f90dd6e24e..3fa7e4839c 100644 --- a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java +++ b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java @@ -16,6 +16,7 @@ */ package org.apache.catalina.tribes.group; +import org.apache.tomcat.util.res.StringManager; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -26,6 +27,7 @@ import org.apache.catalina.tribes.ChannelException; import org.apache.catalina.tribes.ChannelInterceptor; public class TestGroupChannelOptionFlag { +private final StringManager sm = StringManager.getManager(TestGroupChannelOptionFlag.class); private GroupChannel channel = null; @Before @@ -47,6 +49,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -57,9 +61,9 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if (x.getMessage().contains("option flag conflict")) { - error = true; +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { +error = true; } } Assert.assertTrue(error); @@ -67,6 +71,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionNoConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -80,14 +86,20 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if (x.getMessage().contains("option flag conflict")) { - error = true; +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { +error = true; } } Assert.assertFalse(error); } +private String getTestOptionErrorMsgRegx() { +String errorMsgRegx = sm.getString("groupChannel.optionFlag.conflict", ".+").replace("[", "\\["); +errorMsgRegx += "; No faulty members identified."; +return errorMsgRegx; +} + public static class TestInterceptor extends ChannelInterceptorBase { // Just use base class } diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java b/test/org/apache/catalina/valves/TestErrorReportValve.java index 5de7f9ac5e..cee135304f 100644 --- a/test/org/apache/catalina/valves/TestErrorReportValve.java +++ b/test/org/apache/catalina/valves/TestErrorReportValve.java @@ -17,10 +17,7 @@ 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 java.nio.charset.StandardCharsets; import jakarta.servlet.AsyncContext; import jakarta.servlet.RequestDispatcher; @@ -31,6 +28,7 @@ import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServle
[tomcat] branch main updated: Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output t
This is an automated email from the ASF dual-hosted git repository. lihan 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 e0f6e0c641 Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. e0f6e0c641 is described below commit e0f6e0c641fa36558bee8c83445f48767418994c Author: lihan AuthorDate: Wed Aug 17 13:58:14 2022 +0800 Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. --- .../tribes/group/TestGroupChannelOptionFlag.java | 24 -- .../catalina/valves/TestErrorReportValve.java | 20 -- .../coyote/ajp/TestAbstractAjpProcessor.java | 14 ++--- test/org/apache/coyote/ajp/TesterAjpMessage.java | 21 --- test/org/apache/coyote/http2/TestFlowControl.java | 6 -- test/org/apache/coyote/http2/TestHttp2Limits.java | 5 - 6 files changed, 59 insertions(+), 31 deletions(-) diff --git a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java index f90dd6e24e..3fa7e4839c 100644 --- a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java +++ b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java @@ -16,6 +16,7 @@ */ package org.apache.catalina.tribes.group; +import org.apache.tomcat.util.res.StringManager; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -26,6 +27,7 @@ import org.apache.catalina.tribes.ChannelException; import org.apache.catalina.tribes.ChannelInterceptor; public class TestGroupChannelOptionFlag { +private final StringManager sm = StringManager.getManager(TestGroupChannelOptionFlag.class); private GroupChannel channel = null; @Before @@ -47,6 +49,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -57,9 +61,9 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if (x.getMessage().contains("option flag conflict")) { - error = true; +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { +error = true; } } Assert.assertTrue(error); @@ -67,6 +71,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionNoConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -80,14 +86,20 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if (x.getMessage().contains("option flag conflict")) { - error = true; +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { +error = true; } } Assert.assertFalse(error); } +private String getTestOptionErrorMsgRegx() { +String errorMsgRegx = sm.getString("groupChannel.optionFlag.conflict", ".+").replace("[", "\\["); +errorMsgRegx += "; No faulty members identified."; +return errorMsgRegx; +} + public static class TestInterceptor extends ChannelInterceptorBase { // Just use base class } diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java b/test/org/apache/catalina/valves/TestErrorReportValve.java index 5de7f9ac5e..cee135304f 100644 --- a/test/org/apache/catalina/valves/TestErrorReportValve.java +++ b/test/org/apache/catalina/valves/TestErrorReportValve.java @@ -17,10 +17,7 @@ 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 java.nio.charset.StandardCharsets; import jakarta.servlet.AsyncContext; import jakarta.servlet.RequestDispatcher; @@ -31,6 +28,7 @@ import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServle
[tomcat] branch 9.0.x updated: Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output
This is an automated email from the ASF dual-hosted git repository. lihan 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 58550071fc Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. 58550071fc is described below commit 58550071fcf92be1cdd56364f69a1333c5fe275b Author: lihan AuthorDate: Wed Aug 17 13:58:14 2022 +0800 Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. --- .../tribes/group/TestGroupChannelOptionFlag.java | 24 -- .../catalina/valves/TestErrorReportValve.java | 20 -- .../coyote/ajp/TestAbstractAjpProcessor.java | 14 ++--- test/org/apache/coyote/ajp/TesterAjpMessage.java | 21 --- test/org/apache/coyote/http2/TestFlowControl.java | 6 -- test/org/apache/coyote/http2/TestHttp2Limits.java | 5 - 6 files changed, 59 insertions(+), 31 deletions(-) diff --git a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java index f90dd6e24e..3fa7e4839c 100644 --- a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java +++ b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java @@ -16,6 +16,7 @@ */ package org.apache.catalina.tribes.group; +import org.apache.tomcat.util.res.StringManager; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -26,6 +27,7 @@ import org.apache.catalina.tribes.ChannelException; import org.apache.catalina.tribes.ChannelInterceptor; public class TestGroupChannelOptionFlag { +private final StringManager sm = StringManager.getManager(TestGroupChannelOptionFlag.class); private GroupChannel channel = null; @Before @@ -47,6 +49,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -57,9 +61,9 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if (x.getMessage().contains("option flag conflict")) { - error = true; +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { +error = true; } } Assert.assertTrue(error); @@ -67,6 +71,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionNoConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -80,14 +86,20 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if (x.getMessage().contains("option flag conflict")) { - error = true; +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { +error = true; } } Assert.assertFalse(error); } +private String getTestOptionErrorMsgRegx() { +String errorMsgRegx = sm.getString("groupChannel.optionFlag.conflict", ".+").replace("[", "\\["); +errorMsgRegx += "; No faulty members identified."; +return errorMsgRegx; +} + public static class TestInterceptor extends ChannelInterceptorBase { // Just use base class } diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java b/test/org/apache/catalina/valves/TestErrorReportValve.java index dc51de94fc..efbe083f06 100644 --- a/test/org/apache/catalina/valves/TestErrorReportValve.java +++ b/test/org/apache/catalina/valves/TestErrorReportValve.java @@ -17,10 +17,7 @@ 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 java.nio.charset.StandardCharsets; import javax.servlet.AsyncContext; import javax.servlet.RequestDispatcher; @@ -31,6 +28,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServle
[tomcat] branch 8.5.x updated: Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output
This is an automated email from the ASF dual-hosted git repository. lihan 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 dc6fffe27d Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. dc6fffe27d is described below commit dc6fffe27d68639aa4a94924f3142d1311482f09 Author: lihan AuthorDate: Wed Aug 17 13:58:14 2022 +0800 Fix BZ66210 https://bz.apache.org/bugzilla/show_bug.cgi?id=66210 Use StringManager to retrieve the expected txt in the current locale and then compare the actual output to the locale specific expected text. --- .../tribes/group/TestGroupChannelOptionFlag.java| 20 .../catalina/valves/TestErrorReportValve.java | 20 .../apache/coyote/ajp/TestAbstractAjpProcessor.java | 14 +++--- test/org/apache/coyote/ajp/TesterAjpMessage.java| 21 ++--- test/org/apache/coyote/http2/TestFlowControl.java | 6 -- test/org/apache/coyote/http2/TestHttp2Limits.java | 5 - 6 files changed, 57 insertions(+), 29 deletions(-) diff --git a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java index d7763a284b..3fa7e4839c 100644 --- a/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java +++ b/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java @@ -16,6 +16,7 @@ */ package org.apache.catalina.tribes.group; +import org.apache.tomcat.util.res.StringManager; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -26,6 +27,7 @@ import org.apache.catalina.tribes.ChannelException; import org.apache.catalina.tribes.ChannelInterceptor; public class TestGroupChannelOptionFlag { +private final StringManager sm = StringManager.getManager(TestGroupChannelOptionFlag.class); private GroupChannel channel = null; @Before @@ -47,6 +49,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -57,8 +61,8 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if ( x.getMessage().indexOf("option flag conflict") >= 0 ) { +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { error = true; } } @@ -67,6 +71,8 @@ public class TestGroupChannelOptionFlag { @Test public void testOptionNoConflict() throws Exception { +String errorMsgRegx = getTestOptionErrorMsgRegx(); + boolean error = false; channel.setOptionCheck(true); ChannelInterceptor i = new TestInterceptor(); @@ -80,14 +86,20 @@ public class TestGroupChannelOptionFlag { channel.addInterceptor(i); try { channel.start(Channel.DEFAULT); -}catch ( ChannelException x ) { -if ( x.getMessage().indexOf("option flag conflict") >= 0 ) { +} catch (ChannelException x) { +if (x.getMessage().matches(errorMsgRegx)) { error = true; } } Assert.assertFalse(error); } +private String getTestOptionErrorMsgRegx() { +String errorMsgRegx = sm.getString("groupChannel.optionFlag.conflict", ".+").replace("[", "\\["); +errorMsgRegx += "; No faulty members identified."; +return errorMsgRegx; +} + public static class TestInterceptor extends ChannelInterceptorBase { // Just use base class } diff --git a/test/org/apache/catalina/valves/TestErrorReportValve.java b/test/org/apache/catalina/valves/TestErrorReportValve.java index 512008098c..83e75b0d0a 100644 --- a/test/org/apache/catalina/valves/TestErrorReportValve.java +++ b/test/org/apache/catalina/valves/TestErrorReportValve.java @@ -17,10 +17,7 @@ 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 java.nio.charset.StandardCharsets; import javax.servlet.AsyncContext; import javax.servlet.RequestDispatcher; @@ -29,6 +26,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.tomcat.util.res.StringManager;
[tomcat-jakartaee-migration] branch main updated: Recalculate the CRC value after converting to avoid CRC checksum failures when the entry type is STORED
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git The following commit(s) were added to refs/heads/main by this push: new d39df40 Recalculate the CRC value after converting to avoid CRC checksum failures when the entry type is STORED d39df40 is described below commit d39df404eb7285c8482759626c5fc2e751a08000 Author: lihan AuthorDate: Fri Aug 26 17:23:59 2022 +0800 Recalculate the CRC value after converting to avoid CRC checksum failures when the entry type is STORED --- CHANGES.md | 1 + .../org/apache/tomcat/jakartaee/Migration.java | 75 -- 2 files changed, 69 insertions(+), 7 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1db82aa..51640b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # Tomcat Migration Tool for Jakarta EE - Changelog ## 1.0.2 (in progress) +- Fix [#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) by recalculating the CRC value of the entry type is SORTED after converting (lihan) ## 1.0.1 - Fix [#19](https://github.com/apache/tomcat-jakartaee-migration/issues/19). Add support for converting `.groovy` files. diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java b/src/main/java/org/apache/tomcat/jakartaee/Migration.java index 3d87d1a..bd18767 100644 --- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java +++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java @@ -32,8 +32,11 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.zip.CRC32; +import java.util.zip.ZipEntry; import java.util.zip.ZipException; +import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; @@ -211,8 +214,8 @@ public class Migration { private void migrateArchiveStreaming(InputStream src, OutputStream dest) throws IOException { -try (ZipArchiveInputStream srcZipStream = new ZipArchiveInputStream(new CloseShieldInputStream(src)); -ZipArchiveOutputStream destZipStream = new ZipArchiveOutputStream(new CloseShieldOutputStream(dest))) { +try (ZipArchiveInputStream srcZipStream = new ZipArchiveInputStream(CloseShieldInputStream.wrap(src)); +CrcZipArchiveOutputStream destZipStream = new CrcZipArchiveOutputStream(CloseShieldOutputStream.wrap(dest))) { ZipArchiveEntry srcZipEntry; while ((srcZipEntry = srcZipStream.getNextZipEntry()) != null) { String srcName = srcZipEntry.getName(); @@ -221,7 +224,7 @@ public class Migration { continue; } String destName = profile.convert(srcName); -RenamableZipArchiveEntry destZipEntry = new RenamableZipArchiveEntry(srcZipEntry); +MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry, false); destZipEntry.setName(destName); destZipStream.putArchiveEntry(destZipEntry); migrateStream(srcName, srcZipStream, destZipStream); @@ -251,7 +254,7 @@ public class Migration { continue; } String destName = profile.convert(srcName); -RenamableZipArchiveEntry destZipEntry = new RenamableZipArchiveEntry(srcZipEntry); +MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry, true); destZipEntry.setName(destName); destZipStream.putArchiveEntry(destZipEntry); migrateStream(srcName, srcZipFile.getInputStream(srcZipEntry), destZipStream); @@ -316,10 +319,31 @@ public class Migration { return false; } -private static class RenamableZipArchiveEntry extends ZipArchiveEntry { - -public RenamableZipArchiveEntry(ZipArchiveEntry entry) throws ZipException { +private static class MigrationZipArchiveEntry extends ZipArchiveEntry { +protected final CRC32 crc = new CRC32(); +protected long size = 0; +protected boolean needResetCrc; +public MigrationZipArchiveEntry(ZipArchiveEntry entry, boolean inMemory) throws ZipException { super(entry); +// No recalculation required, when in memory mode and not of type SORTED +needResetCrc = !inMemory && entry.getMethod() == ZipEntry.STORED; +} + +@Override +public long getSize() { +return needResetCrc ? size : super.getSize(); +} + +@Override +public long getCrc() { +
[tomcat-jakartaee-migration] branch main updated (d39df40 -> 9e88142)
This is an automated email from the ASF dual-hosted git repository. lihan pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git from d39df40 Recalculate the CRC value after converting to avoid CRC checksum failures when the entry type is STORED add 9e88142 Remove duplicate property No new revisions were added by this update. Summary of changes: src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties | 1 - 1 file changed, 1 deletion(-) - 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: Manually merge #548 - Avoid int overflow when parsing octet
This is an automated email from the ASF dual-hosted git repository. lihan 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 fb4d9198de Manually merge #548 - Avoid int overflow when parsing octet fb4d9198de is described below commit fb4d9198de7bd8b2ad144c6aa728de874448d278 Author: lihan AuthorDate: Mon Aug 29 21:43:06 2022 +0800 Manually merge #548 - Avoid int overflow when parsing octet --- java/org/apache/tomcat/util/http/parser/HttpParser.java | 4 test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java | 2 ++ webapps/docs/changelog.xml | 4 3 files changed, 10 insertions(+) diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java b/java/org/apache/tomcat/util/http/parser/HttpParser.java index 4df0467194..21ba58967d 100644 --- a/java/org/apache/tomcat/util/http/parser/HttpParser.java +++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java @@ -754,6 +754,10 @@ public class HttpParser { } } else { octet = octet * 10 + c - '0'; +// Avoid overflow +if (octet > 255) { +break; +} } } else if (c == ':') { break; diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java index e5b9bc0572..fa6e0634a8 100644 --- a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java +++ b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java @@ -78,6 +78,8 @@ public class TestHttpParserHost { result.add(new Object[] { TestType.IPv4, "0.a.0.0:8080", Integer.valueOf(7), null} ); result.add(new Object[] { TestType.IPv4, "localhost", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "localhost:8080", Integer.valueOf(9), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.localhost", Integer.valueOf(-1), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.com", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org:8080", Integer.valueOf(17), null} ); result.add(new Object[] { TestType.IPv4, "0.0.0.com", Integer.valueOf(-1), null} ); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 4c77efa327..b71bf80807 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -203,6 +203,10 @@ errors) via a UserDataHelper to broadly align it with the behaviour of HTTP/1.1 for parsing issues and exceeding limits. (markt) + +66240: Avoid int overflow when parsing octets by limiting +the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Manually merge #548 - Avoid int overflow when parsing octet
This is an automated email from the ASF dual-hosted git repository. lihan 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 054abe0fab Manually merge #548 - Avoid int overflow when parsing octet 054abe0fab is described below commit 054abe0fab178bfdfab005ae75f2317e7ca80151 Author: lihan AuthorDate: Mon Aug 29 21:43:06 2022 +0800 Manually merge #548 - Avoid int overflow when parsing octet --- java/org/apache/tomcat/util/http/parser/HttpParser.java | 4 test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java | 2 ++ webapps/docs/changelog.xml | 4 3 files changed, 10 insertions(+) diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java b/java/org/apache/tomcat/util/http/parser/HttpParser.java index 4df0467194..21ba58967d 100644 --- a/java/org/apache/tomcat/util/http/parser/HttpParser.java +++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java @@ -754,6 +754,10 @@ public class HttpParser { } } else { octet = octet * 10 + c - '0'; +// Avoid overflow +if (octet > 255) { +break; +} } } else if (c == ':') { break; diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java index e5b9bc0572..fa6e0634a8 100644 --- a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java +++ b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java @@ -78,6 +78,8 @@ public class TestHttpParserHost { result.add(new Object[] { TestType.IPv4, "0.a.0.0:8080", Integer.valueOf(7), null} ); result.add(new Object[] { TestType.IPv4, "localhost", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "localhost:8080", Integer.valueOf(9), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.localhost", Integer.valueOf(-1), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.com", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org:8080", Integer.valueOf(17), null} ); result.add(new Object[] { TestType.IPv4, "0.0.0.com", Integer.valueOf(-1), null} ); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 7d0db6d06e..d198c4f76b 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -203,6 +203,10 @@ errors) via a UserDataHelper to broadly align it with the behaviour of HTTP/1.1 for parsing issues and exceeding limits. (markt) + +66240: Avoid int overflow when parsing octets by limiting +the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + - 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: Manually merge #548 - Avoid int overflow when parsing octet
This is an automated email from the ASF dual-hosted git repository. lihan 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 d855bc1c99 Manually merge #548 - Avoid int overflow when parsing octet d855bc1c99 is described below commit d855bc1c996847e372f977011b90f22c9454f2ac Author: lihan AuthorDate: Mon Aug 29 21:43:06 2022 +0800 Manually merge #548 - Avoid int overflow when parsing octet --- java/org/apache/tomcat/util/http/parser/HttpParser.java | 4 test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java | 2 ++ webapps/docs/changelog.xml | 4 3 files changed, 10 insertions(+) diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java b/java/org/apache/tomcat/util/http/parser/HttpParser.java index 4df0467194..21ba58967d 100644 --- a/java/org/apache/tomcat/util/http/parser/HttpParser.java +++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java @@ -754,6 +754,10 @@ public class HttpParser { } } else { octet = octet * 10 + c - '0'; +// Avoid overflow +if (octet > 255) { +break; +} } } else if (c == ':') { break; diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java index e5b9bc0572..fa6e0634a8 100644 --- a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java +++ b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java @@ -78,6 +78,8 @@ public class TestHttpParserHost { result.add(new Object[] { TestType.IPv4, "0.a.0.0:8080", Integer.valueOf(7), null} ); result.add(new Object[] { TestType.IPv4, "localhost", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "localhost:8080", Integer.valueOf(9), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.localhost", Integer.valueOf(-1), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.com", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org:8080", Integer.valueOf(17), null} ); result.add(new Object[] { TestType.IPv4, "0.0.0.com", Integer.valueOf(-1), null} ); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index ccf50d1541..7a4ece4eda 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -203,6 +203,10 @@ errors) via a UserDataHelper to broadly align it with the behaviour of HTTP/1.1 for parsing issues and exceeding limits. (markt) + +66240: Avoid int overflow when parsing octets by limiting +the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + - 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: Manually merge #548 - Avoid int overflow when parsing octet
This is an automated email from the ASF dual-hosted git repository. lihan 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 44263ecce6 Manually merge #548 - Avoid int overflow when parsing octet 44263ecce6 is described below commit 44263ecce6f7dd3a9e99a4d8a1f36533f5434a30 Author: lihan AuthorDate: Mon Aug 29 21:43:06 2022 +0800 Manually merge #548 - Avoid int overflow when parsing octet --- java/org/apache/tomcat/util/http/parser/HttpParser.java | 4 test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java | 2 ++ webapps/docs/changelog.xml | 4 3 files changed, 10 insertions(+) diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java b/java/org/apache/tomcat/util/http/parser/HttpParser.java index 2b6dae5264..32b3a6cd60 100644 --- a/java/org/apache/tomcat/util/http/parser/HttpParser.java +++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java @@ -774,6 +774,10 @@ public class HttpParser { } } else { octet = octet * 10 + c - '0'; +// Avoid overflow +if (octet > 255) { +break; +} } } else if (c == ':') { break; diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java index a162472551..401d647932 100644 --- a/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java +++ b/test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java @@ -78,6 +78,8 @@ public class TestHttpParserHost { result.add(new Object[] { TestType.IPv4, "0.a.0.0:8080", Integer.valueOf(7), null} ); result.add(new Object[] { TestType.IPv4, "localhost", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "localhost:8080", Integer.valueOf(9), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.localhost", Integer.valueOf(-1), null} ); +result.add(new Object[] { TestType.IPv4, "4294967295.com", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "tomcat.apache.org:8080", Integer.valueOf(17), null} ); result.add(new Object[] { TestType.IPv4, "0.0.0.com", Integer.valueOf(-1), null} ); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index cda85a0fcb..62c72ec1a8 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -157,6 +157,10 @@ errors) via a UserDataHelper to broadly align it with the behaviour of HTTP/1.1 for parsing issues and exceeding limits. (markt) + +66240: Avoid int overflow when parsing octets by limiting +the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + - 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 BZ66246 https://bz.apache.org/bugzilla/show_bug.cgi?id=66246
This is an automated email from the ASF dual-hosted git repository. lihan 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 971038192b Fix BZ66246 https://bz.apache.org/bugzilla/show_bug.cgi?id=66246 971038192b is described below commit 971038192b1d747810de71e4dac8559d4c04d7a3 Author: lihan AuthorDate: Wed Aug 31 09:56:36 2022 +0800 Fix BZ66246 https://bz.apache.org/bugzilla/show_bug.cgi?id=66246 --- java/org/apache/jasper/resources/LocalStrings.properties | 2 +- webapps/docs/changelog.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties index 4339d968da..6e4496378f 100644 --- a/java/org/apache/jasper/resources/LocalStrings.properties +++ b/java/org/apache/jasper/resources/LocalStrings.properties @@ -389,7 +389,7 @@ jspc.webxml.footer=\n\ \n\ \n jspc.webxml.header=\n\ -http://xmlns.jcp.org/xml/ns/javaee"\n\ +http://xmlns.jcp.org/xml/ns/javaee"\n\ \ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n\ \ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee\n\ \ http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd"\n\ diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 0831e26371..9322c11152 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -239,6 +239,9 @@ type conversion fails during an EL arithmetic operation. This is an EL error so ELException seems more appropriate. (markt) + +66246: Fix JspC generates invalid web.xml due to incorrect header. (lihan) + - 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: Update the schema location of webxml,thanks to Mark
This is an automated email from the ASF dual-hosted git repository. lihan 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 9b893fdc5d Update the schema location of webxml,thanks to Mark 9b893fdc5d is described below commit 9b893fdc5db5541809664f8476e1b593245154ea Author: lihan AuthorDate: Wed Aug 31 15:31:20 2022 +0800 Update the schema location of webxml,thanks to Mark --- java/org/apache/jasper/resources/LocalStrings.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties index 6e4496378f..7cb588fc22 100644 --- a/java/org/apache/jasper/resources/LocalStrings.properties +++ b/java/org/apache/jasper/resources/LocalStrings.properties @@ -392,7 +392,7 @@ jspc.webxml.header=\n\ http://xmlns.jcp.org/xml/ns/javaee"\n\ \ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n\ \ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee\n\ -\ http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd"\n\ +\ http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"\n\ \ version="4.0"\n\ \ metadata-complete="false">\n\
[tomcat] branch main updated: Pull up duplicate check codes
This is an automated email from the ASF dual-hosted git repository. lihan 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 64573401e9 Pull up duplicate check codes 64573401e9 is described below commit 64573401e9e5f5f3c9b34eb919f59bb89d8c1e1d Author: lihan AuthorDate: Fri Sep 2 16:41:28 2022 +0800 Pull up duplicate check codes --- .../apache/catalina/valves/ErrorReportValve.java | 35 +++--- .../catalina/valves/JsonErrorReportValve.java | 18 --- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index 126de87eb7..e7fbc696e4 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -141,6 +141,23 @@ public class ErrorReportValve extends ValveBase { response.setSuspended(false); try { +int statusCode = response.getStatus(); + +// Do nothing on a 1xx, 2xx and 3xx status +// Do nothing if anything has been written already +// Do nothing if the response hasn't been explicitly marked as in error +//and that error has not been reported. +if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { +return; +} + +// If an error has occurred that prevents further I/O, don't waste time +// producing an error report that will never be read +AtomicBoolean result = new AtomicBoolean(false); +response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); +if (!result.get()) { +return; +} report(request, response, throwable); } catch (Throwable tt) { ExceptionUtils.handleThrowable(tt); @@ -160,25 +177,7 @@ public class ErrorReportValve extends ValveBase { * a root cause exception */ protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - ErrorPage errorPage = null; if (throwable != null) { errorPage = errorPageSupport.find(throwable); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 8ba4acbc3f..9da5c33550 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -41,25 +41,7 @@ public class JsonErrorReportValve extends ErrorReportValve { @Override protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - StringManager smClient = StringManager.getManager(Constants.Package, request.getLocales()); response.setLocale(smClient.getLocale()); String type = null; - 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: Pull up duplicate check codes
This is an automated email from the ASF dual-hosted git repository. lihan 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 9ad34a856e Pull up duplicate check codes 9ad34a856e is described below commit 9ad34a856edd88f9a0616c1e44be0d165c8d0bc4 Author: lihan AuthorDate: Fri Sep 2 16:41:28 2022 +0800 Pull up duplicate check codes --- .../apache/catalina/valves/ErrorReportValve.java | 35 +++--- .../catalina/valves/JsonErrorReportValve.java | 18 --- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index 126de87eb7..e7fbc696e4 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -141,6 +141,23 @@ public class ErrorReportValve extends ValveBase { response.setSuspended(false); try { +int statusCode = response.getStatus(); + +// Do nothing on a 1xx, 2xx and 3xx status +// Do nothing if anything has been written already +// Do nothing if the response hasn't been explicitly marked as in error +//and that error has not been reported. +if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { +return; +} + +// If an error has occurred that prevents further I/O, don't waste time +// producing an error report that will never be read +AtomicBoolean result = new AtomicBoolean(false); +response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); +if (!result.get()) { +return; +} report(request, response, throwable); } catch (Throwable tt) { ExceptionUtils.handleThrowable(tt); @@ -160,25 +177,7 @@ public class ErrorReportValve extends ValveBase { * a root cause exception */ protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - ErrorPage errorPage = null; if (throwable != null) { errorPage = errorPageSupport.find(throwable); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 8ba4acbc3f..9da5c33550 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -41,25 +41,7 @@ public class JsonErrorReportValve extends ErrorReportValve { @Override protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - StringManager smClient = StringManager.getManager(Constants.Package, request.getLocales()); response.setLocale(smClient.getLocale()); String type = null; - 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: Pull up duplicate check codes
This is an automated email from the ASF dual-hosted git repository. lihan 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 26ba1fcccf Pull up duplicate check codes 26ba1fcccf is described below commit 26ba1fcccf5c29e771845e27cba0d47cbe563c6b Author: lihan AuthorDate: Fri Sep 2 16:41:28 2022 +0800 Pull up duplicate check codes --- .../apache/catalina/valves/ErrorReportValve.java | 35 +++--- .../catalina/valves/JsonErrorReportValve.java | 18 --- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index 43e0e111df..f98a0d6a07 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -141,6 +141,23 @@ public class ErrorReportValve extends ValveBase { response.setSuspended(false); try { +int statusCode = response.getStatus(); + +// Do nothing on a 1xx, 2xx and 3xx status +// Do nothing if anything has been written already +// Do nothing if the response hasn't been explicitly marked as in error +//and that error has not been reported. +if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { +return; +} + +// If an error has occurred that prevents further I/O, don't waste time +// producing an error report that will never be read +AtomicBoolean result = new AtomicBoolean(false); +response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); +if (!result.get()) { +return; +} report(request, response, throwable); } catch (Throwable tt) { ExceptionUtils.handleThrowable(tt); @@ -160,25 +177,7 @@ public class ErrorReportValve extends ValveBase { * a root cause exception */ protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - ErrorPage errorPage = null; if (throwable != null) { errorPage = errorPageSupport.find(throwable); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 8ba4acbc3f..9da5c33550 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -41,25 +41,7 @@ public class JsonErrorReportValve extends ErrorReportValve { @Override protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - StringManager smClient = StringManager.getManager(Constants.Package, request.getLocales()); response.setLocale(smClient.getLocale()); String type = null; - 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: Back-porting JsonErrorReportValve
This is an automated email from the ASF dual-hosted git repository. lihan 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 be7af10c4d Back-porting JsonErrorReportValve be7af10c4d is described below commit be7af10c4d5f2aad54a5d59add49a8d2ad09db2c Author: lihan AuthorDate: Fri Sep 2 16:41:28 2022 +0800 Back-porting JsonErrorReportValve --- .../apache/catalina/valves/ErrorReportValve.java | 35 + .../catalina/valves/JsonErrorReportValve.java | 89 ++ webapps/docs/changelog.xml | 5 ++ webapps/docs/config/valve.xml | 33 4 files changed, 144 insertions(+), 18 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index ae02d62499..d59799b066 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -141,6 +141,23 @@ public class ErrorReportValve extends ValveBase { response.setSuspended(false); try { +int statusCode = response.getStatus(); + +// Do nothing on a 1xx, 2xx and 3xx status +// Do nothing if anything has been written already +// Do nothing if the response hasn't been explicitly marked as in error +//and that error has not been reported. +if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { +return; +} + +// If an error has occurred that prevents further I/O, don't waste time +// producing an error report that will never be read +AtomicBoolean result = new AtomicBoolean(false); +response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); +if (!result.get()) { +return; +} report(request, response, throwable); } catch (Throwable tt) { ExceptionUtils.handleThrowable(tt); @@ -160,25 +177,7 @@ public class ErrorReportValve extends ValveBase { * a root cause exception */ protected void report(Request request, Response response, Throwable throwable) { - int statusCode = response.getStatus(); - -// Do nothing on a 1xx, 2xx and 3xx status -// Do nothing if anything has been written already -// Do nothing if the response hasn't been explicitly marked as in error -//and that error has not been reported. -if (statusCode < 400 || response.getContentWritten() > 0 || !response.setErrorReported()) { -return; -} - -// If an error has occurred that prevents further I/O, don't waste time -// producing an error report that will never be read -AtomicBoolean result = new AtomicBoolean(false); -response.getCoyoteResponse().action(ActionCode.IS_IO_ALLOWED, result); -if (!result.get()) { -return; -} - ErrorPage errorPage = null; if (throwable != null) { errorPage = errorPageSupport.find(throwable); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java new file mode 100644 index 00..19afec6d84 --- /dev/null +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -0,0 +1,89 @@ +/* + * 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.catalina.valves; + +import java.io.IOException; +import java.io.Writer; + +import org.apache.catalina.connector.Request; +import org.apache.catalina.connector.Response; +import org.apache.tomcat.util.ExceptionUtils; +import org.apache.tomcat.util.res.StringManager; + +/** + * Implementation of a Valve that outputs error jsons. + * + * This Valve should be attached at the Host level, although it will work + * if attached to a Context. + * + */ +public class JsonErrorReportValve extends ErrorReportValve { + +public JsonErrorRepor
[tomcat] branch main updated: Fix incorrect debug messages
This is an automated email from the ASF dual-hosted git repository. lihan 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 5190f92b5e Fix incorrect debug messages 5190f92b5e is described below commit 5190f92b5e8288cde5c0f4a9814b46166e6447bb Author: lihan AuthorDate: Fri Sep 2 21:42:24 2022 +0800 Fix incorrect debug messages --- java/org/apache/catalina/valves/ErrorReportValve.java | 2 +- java/org/apache/catalina/valves/JsonErrorReportValve.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index e7fbc696e4..1048985d32 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -317,7 +317,7 @@ public class ErrorReportValve extends ValveBase { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 19afec6d84..8af7968d30 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -73,7 +73,7 @@ public class JsonErrorReportValve extends ErrorReportValve { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); - 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 incorrect debug messages
This is an automated email from the ASF dual-hosted git repository. lihan 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 02fe1209d5 Fix incorrect debug messages 02fe1209d5 is described below commit 02fe1209d547a373c429787f5af73cee834311f1 Author: lihan AuthorDate: Fri Sep 2 21:42:24 2022 +0800 Fix incorrect debug messages --- java/org/apache/catalina/valves/ErrorReportValve.java | 2 +- java/org/apache/catalina/valves/JsonErrorReportValve.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index e7fbc696e4..1048985d32 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -317,7 +317,7 @@ public class ErrorReportValve extends ValveBase { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 19afec6d84..8af7968d30 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -73,7 +73,7 @@ public class JsonErrorReportValve extends ErrorReportValve { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); - 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 incorrect debug messages
This is an automated email from the ASF dual-hosted git repository. lihan 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 9802fbbf67 Fix incorrect debug messages 9802fbbf67 is described below commit 9802fbbf672e5871d4f7c488f39a7cc989c95dcd Author: lihan AuthorDate: Fri Sep 2 21:42:24 2022 +0800 Fix incorrect debug messages --- java/org/apache/catalina/valves/ErrorReportValve.java | 2 +- java/org/apache/catalina/valves/JsonErrorReportValve.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index f98a0d6a07..00553535f9 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -317,7 +317,7 @@ public class ErrorReportValve extends ValveBase { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 19afec6d84..8af7968d30 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -73,7 +73,7 @@ public class JsonErrorReportValve extends ErrorReportValve { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); - 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 incorrect debug messages
This is an automated email from the ASF dual-hosted git repository. lihan 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 583d658e65 Fix incorrect debug messages 583d658e65 is described below commit 583d658e65905ec6d3191ed3103036cdad4c4c08 Author: lihan AuthorDate: Fri Sep 2 21:42:24 2022 +0800 Fix incorrect debug messages --- java/org/apache/catalina/valves/ErrorReportValve.java | 2 +- java/org/apache/catalina/valves/JsonErrorReportValve.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index d59799b066..cc204695f8 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -317,7 +317,7 @@ public class ErrorReportValve extends ValveBase { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java b/java/org/apache/catalina/valves/JsonErrorReportValve.java index 19afec6d84..8af7968d30 100644 --- a/java/org/apache/catalina/valves/JsonErrorReportValve.java +++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java @@ -73,7 +73,7 @@ public class JsonErrorReportValve extends ErrorReportValve { } catch (Throwable t) { ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) { -container.getLogger().debug("status.setContentType", t); +container.getLogger().debug("Failure to set the content-type of response", t); } } Writer writer = response.getReporter(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Pull up creation of Handler
This is an automated email from the ASF dual-hosted git repository. lihan 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 d0f82bd59f Pull up creation of Handler d0f82bd59f is described below commit d0f82bd59f67f50f2f7c5a5ef276fc402ba9d287 Author: lihan AuthorDate: Sun Sep 4 20:52:30 2022 +0800 Pull up creation of Handler --- java/org/apache/coyote/AbstractProtocol.java | 3 +++ java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 3 --- java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 449d662f54..e21f6b731e 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -97,6 +97,9 @@ public abstract class AbstractProtocol implements ProtocolHandler, public AbstractProtocol(AbstractEndpoint endpoint) { this.endpoint = endpoint; +ConnectionHandler cHandler = new ConnectionHandler<>(this); +getEndpoint().setHandler(cHandler); +setHandler(cHandler); setConnectionLinger(Constants.DEFAULT_CONNECTION_LINGER); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index 93f0babc39..e822c29af9 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -51,9 +51,6 @@ public abstract class AbstractAjpProtocol extends AbstractProtocol { getEndpoint().setUseSendfile(false); // AJP listens on loopback by default getEndpoint().setAddress(InetAddress.getLoopbackAddress()); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index c33ab7035a..4b90ac7e8c 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -64,9 +64,6 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocol { public AbstractHttp11Protocol(AbstractEndpoint endpoint) { super(endpoint); setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } - 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: Pull up creation of Handler
This is an automated email from the ASF dual-hosted git repository. lihan 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 9a73540368 Pull up creation of Handler 9a73540368 is described below commit 9a7354036853416a672a84dc7ebb016d3bb96205 Author: lihan AuthorDate: Sun Sep 4 20:52:30 2022 +0800 Pull up creation of Handler --- java/org/apache/coyote/AbstractProtocol.java | 3 +++ java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 3 --- java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 09367766d6..271a8add2d 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -97,6 +97,9 @@ public abstract class AbstractProtocol implements ProtocolHandler, public AbstractProtocol(AbstractEndpoint endpoint) { this.endpoint = endpoint; +ConnectionHandler cHandler = new ConnectionHandler<>(this); +getEndpoint().setHandler(cHandler); +setHandler(cHandler); setConnectionLinger(Constants.DEFAULT_CONNECTION_LINGER); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index 93f0babc39..e822c29af9 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -51,9 +51,6 @@ public abstract class AbstractAjpProtocol extends AbstractProtocol { getEndpoint().setUseSendfile(false); // AJP listens on loopback by default getEndpoint().setAddress(InetAddress.getLoopbackAddress()); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index dbf26a8dbf..220e255f69 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -64,9 +64,6 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocol { public AbstractHttp11Protocol(AbstractEndpoint endpoint) { super(endpoint); setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } - 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: Pull up creation of Handler
This is an automated email from the ASF dual-hosted git repository. lihan 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 3e6ef7bf3c Pull up creation of Handler 3e6ef7bf3c is described below commit 3e6ef7bf3ca4d32dd0044685a1aa251044655970 Author: lihan AuthorDate: Sun Sep 4 20:52:30 2022 +0800 Pull up creation of Handler --- java/org/apache/coyote/AbstractProtocol.java | 3 +++ java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 3 --- java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index f969779d9d..b0c1285b9d 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -97,6 +97,9 @@ public abstract class AbstractProtocol implements ProtocolHandler, public AbstractProtocol(AbstractEndpoint endpoint) { this.endpoint = endpoint; +ConnectionHandler cHandler = new ConnectionHandler<>(this); +getEndpoint().setHandler(cHandler); +setHandler(cHandler); setConnectionLinger(Constants.DEFAULT_CONNECTION_LINGER); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index c5831147a6..9bfbcdbc82 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -51,9 +51,6 @@ public abstract class AbstractAjpProtocol extends AbstractProtocol { getEndpoint().setUseSendfile(false); // AJP listens on loopback by default getEndpoint().setAddress(InetAddress.getLoopbackAddress()); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index 63edf18c6e..64e2383919 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -62,9 +62,6 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocol { public AbstractHttp11Protocol(AbstractEndpoint endpoint) { super(endpoint); setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } - 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: Pull up creation of Handler
This is an automated email from the ASF dual-hosted git repository. lihan 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 8f057b62a3 Pull up creation of Handler 8f057b62a3 is described below commit 8f057b62a3d49f4be452a32ab24c8f6b23059f22 Author: lihan AuthorDate: Sun Sep 4 20:52:30 2022 +0800 Pull up creation of Handler --- java/org/apache/coyote/AbstractProtocol.java | 3 +++ java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 3 --- java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java index 461d04dc0c..b3d375437d 100644 --- a/java/org/apache/coyote/AbstractProtocol.java +++ b/java/org/apache/coyote/AbstractProtocol.java @@ -93,6 +93,9 @@ public abstract class AbstractProtocol implements ProtocolHandler, public AbstractProtocol(AbstractEndpoint endpoint) { this.endpoint = endpoint; +ConnectionHandler cHandler = new ConnectionHandler<>(this); +setHandler(cHandler); +getEndpoint().setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index 70f392fbbd..89d51b40ee 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -51,9 +51,6 @@ public abstract class AbstractAjpProtocol extends AbstractProtocol { getEndpoint().setUseSendfile(false); // AJP listens on loopback by default getEndpoint().setAddress(InetAddress.getLoopbackAddress()); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index aedf32eefa..82d0a7166e 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -62,9 +62,6 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocol { public AbstractHttp11Protocol(AbstractEndpoint endpoint) { super(endpoint); setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); -ConnectionHandler cHandler = new ConnectionHandler<>(this); -setHandler(cHandler); -getEndpoint().setHandler(cHandler); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章.
This is an automated email from the ASF dual-hosted git repository. lihan 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 74babb122c Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. 74babb122c is described below commit 74babb122c9d4ab6d212cda1cf458fd655a2c3a3 Author: lihan AuthorDate: Wed Sep 7 14:40:51 2022 +0800 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 2 +- webapps/docs/changelog.xml | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index 06ff079c34..6496d8c2b2 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -366,7 +366,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Switch to the socket timeout. wrapper.setReadTimeout(connectionTimeout); } -if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length - 1) { +if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length) { boolean prefaceMatch = true; for (int i = 0; i < CLIENT_PREFACE_START.length && prefaceMatch; i++) { if (CLIENT_PREFACE_START[i] != byteBuffer.get(i)) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 4860a2b309..09aab642b7 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -218,6 +218,11 @@ the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + +551: Avoid potential IndexOutOfBoundsException by fixing +incorrect check when matching HTTP/2 preface. Submitted by 刘文章. +(lihan) + - 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: Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章.
This is an automated email from the ASF dual-hosted git repository. lihan 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 c7c87bf131 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. c7c87bf131 is described below commit c7c87bf131390a516bb39bfcc42e546a4e09bf5e Author: lihan AuthorDate: Wed Sep 7 14:40:51 2022 +0800 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 2 +- webapps/docs/changelog.xml | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index 06ff079c34..6496d8c2b2 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -366,7 +366,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Switch to the socket timeout. wrapper.setReadTimeout(connectionTimeout); } -if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length - 1) { +if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length) { boolean prefaceMatch = true; for (int i = 0; i < CLIENT_PREFACE_START.length && prefaceMatch; i++) { if (CLIENT_PREFACE_START[i] != byteBuffer.get(i)) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 69184a6f09..d13f69ee36 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -213,6 +213,11 @@ the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + +551: Avoid potential IndexOutOfBoundsException by fixing +incorrect check when matching HTTP/2 preface. Submitted by 刘文章. +(lihan) + - 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: Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章.
This is an automated email from the ASF dual-hosted git repository. lihan 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 979ac3b5f3 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. 979ac3b5f3 is described below commit 979ac3b5f3587980d738b890b11e8c1458c0943c Author: lihan AuthorDate: Wed Sep 7 14:40:51 2022 +0800 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 2 +- webapps/docs/changelog.xml | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index cd15853a3f..9192f964f6 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -366,7 +366,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Switch to the socket timeout. wrapper.setReadTimeout(connectionTimeout); } -if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length - 1) { +if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length) { boolean prefaceMatch = true; for (int i = 0; i < CLIENT_PREFACE_START.length && prefaceMatch; i++) { if (CLIENT_PREFACE_START[i] != byteBuffer.get(i)) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f9abcee2bc..ec3a553daa 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -213,6 +213,11 @@ the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + +551: Avoid potential IndexOutOfBoundsException by fixing +incorrect check when matching HTTP/2 preface. Submitted by 刘文章. +(lihan) + - 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: Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章.
This is an automated email from the ASF dual-hosted git repository. lihan 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 0feed3deb8 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. 0feed3deb8 is described below commit 0feed3deb8689082d1f153c164ee1e836d063328 Author: lihan AuthorDate: Wed Sep 7 14:40:51 2022 +0800 Avoid potential IndexOutOfBoundsException when matching HTTP/2 preface. Submitted #551 by 刘文章. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 2 +- webapps/docs/changelog.xml | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index eef700d5f5..608e2b1fb6 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -381,7 +381,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Switch to the socket timeout. wrapper.setReadTimeout(wrapper.getEndpoint().getConnectionTimeout()); } -if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length - 1) { +if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length) { boolean prefaceMatch = true; for (int i = 0; i < CLIENT_PREFACE_START.length && prefaceMatch; i++) { if (CLIENT_PREFACE_START[i] != byteBuffer.get(i)) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b304535e52..0d65d7aeca 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -172,6 +172,11 @@ the maximum value to 255. Based on a PR 548 by Stefan Mayr. (lihan) + +551: Avoid potential IndexOutOfBoundsException by fixing +incorrect check when matching HTTP/2 preface. Submitted by 刘文章. +(lihan) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Avoid potential ConcurrentModificationException by using Iterator.
This is an automated email from the ASF dual-hosted git repository. lihan 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 5c5adba7fd Avoid potential ConcurrentModificationException by using Iterator. 5c5adba7fd is described below commit 5c5adba7fdfc02ddaaf3a229efce89852bc305ae Author: lihan AuthorDate: Fri Sep 9 22:57:17 2022 +0800 Avoid potential ConcurrentModificationException by using Iterator. --- .../apache/catalina/servlets/WebdavServlet.java| 36 +- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 54c4d0df78..97619c7e25 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Stack; @@ -1293,9 +1294,11 @@ public class WebdavServlet extends DefaultServlet { if (lock != null) { // At least one of the tokens of the locks must have been given -for (String token : lock.tokens) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -lock.tokens.remove(token); +tokenList.remove(); } } @@ -1308,17 +1311,20 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionLock : collectionLocks) { -if (path.equals(collectionLock.path)) { -for (String token : collectionLock.tokens) { +Iterator collectionLocksList = collectionLocks.iterator(); +while (collectionLocksList.hasNext()) { +lock = collectionLocksList.next(); +if (path.equals(lock.path)) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -collectionLock.tokens.remove(token); +tokenList.remove(); break; } } - -if (collectionLock.tokens.isEmpty()) { -collectionLocks.remove(collectionLock); +if (lock.tokens.isEmpty()) { +collectionLocksList.remove(); // Removing any lock-null resource which would be present lockNullResources.remove(path); } @@ -1392,12 +1398,14 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionsLock : collectionLocks) { -if (collectionsLock.hasExpired()) { -collectionLocks.remove(collectionsLock); -} else if (path.startsWith(collectionsLock.path)) { +Iterator collectionLockList = collectionLocks.iterator(); +while (collectionLockList.hasNext()) { +lock = collectionLockList.next(); +if (lock.hasExpired()) { +collectionLockList.remove(); +} else if (path.startsWith(lock.path)) { boolean tokenMatch = false; -for (String token : collectionsLock.tokens) { +for (String token : lock.tokens) { if (ifHeader.contains(token)) { tokenMatch = true; break; - 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: Avoid potential ConcurrentModificationException by using Iterator.
This is an automated email from the ASF dual-hosted git repository. lihan 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 d37106f04d Avoid potential ConcurrentModificationException by using Iterator. d37106f04d is described below commit d37106f04dbe6271b69f2ccc79cbdfeb8e6d659c Author: lihan AuthorDate: Fri Sep 9 22:57:17 2022 +0800 Avoid potential ConcurrentModificationException by using Iterator. --- .../apache/catalina/servlets/WebdavServlet.java| 36 +- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 54c4d0df78..97619c7e25 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Stack; @@ -1293,9 +1294,11 @@ public class WebdavServlet extends DefaultServlet { if (lock != null) { // At least one of the tokens of the locks must have been given -for (String token : lock.tokens) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -lock.tokens.remove(token); +tokenList.remove(); } } @@ -1308,17 +1311,20 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionLock : collectionLocks) { -if (path.equals(collectionLock.path)) { -for (String token : collectionLock.tokens) { +Iterator collectionLocksList = collectionLocks.iterator(); +while (collectionLocksList.hasNext()) { +lock = collectionLocksList.next(); +if (path.equals(lock.path)) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -collectionLock.tokens.remove(token); +tokenList.remove(); break; } } - -if (collectionLock.tokens.isEmpty()) { -collectionLocks.remove(collectionLock); +if (lock.tokens.isEmpty()) { +collectionLocksList.remove(); // Removing any lock-null resource which would be present lockNullResources.remove(path); } @@ -1392,12 +1398,14 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionsLock : collectionLocks) { -if (collectionsLock.hasExpired()) { -collectionLocks.remove(collectionsLock); -} else if (path.startsWith(collectionsLock.path)) { +Iterator collectionLockList = collectionLocks.iterator(); +while (collectionLockList.hasNext()) { +lock = collectionLockList.next(); +if (lock.hasExpired()) { +collectionLockList.remove(); +} else if (path.startsWith(lock.path)) { boolean tokenMatch = false; -for (String token : collectionsLock.tokens) { +for (String token : lock.tokens) { if (ifHeader.contains(token)) { tokenMatch = true; break; - 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: Avoid potential ConcurrentModificationException by using Iterator.
This is an automated email from the ASF dual-hosted git repository. lihan 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 d0b641313a Avoid potential ConcurrentModificationException by using Iterator. d0b641313a is described below commit d0b641313a5d52e621099e53899828357c8eff32 Author: lihan AuthorDate: Fri Sep 9 22:57:17 2022 +0800 Avoid potential ConcurrentModificationException by using Iterator. --- .../apache/catalina/servlets/WebdavServlet.java| 36 +- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 33ae4f9bd6..f0e5d9da51 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Stack; @@ -1292,9 +1293,11 @@ public class WebdavServlet extends DefaultServlet { if (lock != null) { // At least one of the tokens of the locks must have been given -for (String token : lock.tokens) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -lock.tokens.remove(token); +tokenList.remove(); } } @@ -1307,17 +1310,20 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionLock : collectionLocks) { -if (path.equals(collectionLock.path)) { -for (String token : collectionLock.tokens) { +Iterator collectionLocksList = collectionLocks.iterator(); +while (collectionLocksList.hasNext()) { +lock = collectionLocksList.next(); +if (path.equals(lock.path)) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -collectionLock.tokens.remove(token); +tokenList.remove(); break; } } - -if (collectionLock.tokens.isEmpty()) { -collectionLocks.remove(collectionLock); +if (lock.tokens.isEmpty()) { +collectionLocksList.remove(); // Removing any lock-null resource which would be present lockNullResources.remove(path); } @@ -1391,12 +1397,14 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionsLock : collectionLocks) { -if (collectionsLock.hasExpired()) { -collectionLocks.remove(collectionsLock); -} else if (path.startsWith(collectionsLock.path)) { +Iterator collectionLockList = collectionLocks.iterator(); +while (collectionLockList.hasNext()) { +lock = collectionLockList.next(); +if (lock.hasExpired()) { +collectionLockList.remove(); +} else if (path.startsWith(lock.path)) { boolean tokenMatch = false; -for (String token : collectionsLock.tokens) { +for (String token : lock.tokens) { if (ifHeader.contains(token)) { tokenMatch = true; break; - 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: Avoid potential ConcurrentModificationException by using Iterator.
This is an automated email from the ASF dual-hosted git repository. lihan 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 38b0faa8d7 Avoid potential ConcurrentModificationException by using Iterator. 38b0faa8d7 is described below commit 38b0faa8d7e48b142db293483b72808fe817782a Author: lihan AuthorDate: Fri Sep 9 22:57:17 2022 +0800 Avoid potential ConcurrentModificationException by using Iterator. --- .../apache/catalina/servlets/WebdavServlet.java| 36 +- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 4e34d70375..84badee774 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Stack; @@ -1295,9 +1296,11 @@ public class WebdavServlet extends DefaultServlet { if (lock != null) { // At least one of the tokens of the locks must have been given -for (String token : lock.tokens) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -lock.tokens.remove(token); +tokenList.remove(); } } @@ -1310,17 +1313,20 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionLock : collectionLocks) { -if (path.equals(collectionLock.path)) { -for (String token : collectionLock.tokens) { +Iterator collectionLocksList = collectionLocks.iterator(); +while (collectionLocksList.hasNext()) { +lock = collectionLocksList.next(); +if (path.equals(lock.path)) { +Iterator tokenList = lock.tokens.iterator(); +while (tokenList.hasNext()) { +String token = tokenList.next(); if (lockTokenHeader.contains(token)) { -collectionLock.tokens.remove(token); +tokenList.remove(); break; } } - -if (collectionLock.tokens.isEmpty()) { -collectionLocks.remove(collectionLock); +if (lock.tokens.isEmpty()) { +collectionLocksList.remove(); // Removing any lock-null resource which would be present lockNullResources.remove(path); } @@ -1394,12 +1400,14 @@ public class WebdavServlet extends DefaultServlet { } // Checking inheritable collection locks -for (LockInfo collectionsLock : collectionLocks) { -if (collectionsLock.hasExpired()) { -collectionLocks.remove(collectionsLock); -} else if (path.startsWith(collectionsLock.path)) { +Iterator collectionLockList = collectionLocks.iterator(); +while (collectionLockList.hasNext()) { +lock = collectionLockList.next(); +if (lock.hasExpired()) { +collectionLockList.remove(); +} else if (path.startsWith(lock.path)) { boolean tokenMatch = false; -for (String token : collectionsLock.tokens) { +for (String token : lock.tokens) { if (ifHeader.contains(token)) { tokenMatch = true; break; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat-jakartaee-migration] branch main updated: Correct a regression in the previous fix for #29
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git The following commit(s) were added to refs/heads/main by this push: new adc4ec5 Correct a regression in the previous fix for #29 adc4ec5 is described below commit adc4ec5b8f3375bfc98d35f694fd6a0cc75f29f1 Author: lihan AuthorDate: Thu Sep 15 13:04:43 2022 +0800 Correct a regression in the previous fix for #29 --- .../org/apache/tomcat/jakartaee/Migration.java | 91 ++ 1 file changed, 23 insertions(+), 68 deletions(-) diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java b/src/main/java/org/apache/tomcat/jakartaee/Migration.java index bd18767..d8b899c 100644 --- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java +++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java @@ -36,7 +36,6 @@ import java.util.zip.CRC32; import java.util.zip.ZipEntry; import java.util.zip.ZipException; -import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; @@ -215,8 +214,9 @@ public class Migration { private void migrateArchiveStreaming(InputStream src, OutputStream dest) throws IOException { try (ZipArchiveInputStream srcZipStream = new ZipArchiveInputStream(CloseShieldInputStream.wrap(src)); -CrcZipArchiveOutputStream destZipStream = new CrcZipArchiveOutputStream(CloseShieldOutputStream.wrap(dest))) { +ZipArchiveOutputStream destZipStream = new ZipArchiveOutputStream(CloseShieldOutputStream.wrap(dest))) { ZipArchiveEntry srcZipEntry; +CRC32 crc32 = new CRC32(); while ((srcZipEntry = srcZipStream.getNextZipEntry()) != null) { String srcName = srcZipEntry.getName(); if (isSignatureFile(srcName)) { @@ -224,11 +224,25 @@ public class Migration { continue; } String destName = profile.convert(srcName); -MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry, false); -destZipEntry.setName(destName); -destZipStream.putArchiveEntry(destZipEntry); -migrateStream(srcName, srcZipStream, destZipStream); -destZipStream.closeArchiveEntry(); +if (srcZipEntry.getMethod() == ZipEntry.STORED) { +ByteArrayOutputStream tempBuffer = new ByteArrayOutputStream((int) (srcZipEntry.getSize() * 1.05)); +migrateStream(srcName, srcZipStream, tempBuffer); +crc32.update(tempBuffer.toByteArray(), 0, tempBuffer.size()); +MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry); +destZipEntry.setName(destName); +destZipEntry.setSize(tempBuffer.size()); +destZipEntry.setCrc(crc32.getValue()); +destZipStream.putArchiveEntry(destZipEntry); +tempBuffer.writeTo(destZipStream); +destZipStream.closeArchiveEntry(); +crc32.reset(); +} else { +MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry); +destZipEntry.setName(destName); +destZipStream.putArchiveEntry(destZipEntry); +migrateStream(srcName, srcZipStream, destZipStream); +destZipStream.closeArchiveEntry(); +} } } } @@ -254,7 +268,7 @@ public class Migration { continue; } String destName = profile.convert(srcName); -MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry, true); +MigrationZipArchiveEntry destZipEntry = new MigrationZipArchiveEntry(srcZipEntry); destZipEntry.setName(destName); destZipStream.putArchiveEntry(destZipEntry); migrateStream(srcName, srcZipFile.getInputStream(srcZipEntry), destZipStream); @@ -320,30 +334,8 @@ public class Migration { } private static class MigrationZipArchiveEntry extends ZipArchiveEntry { -protected final CRC32 crc = new CRC32(); -protected long size = 0; -protected boolean needResetCrc; -public MigrationZipArchiveEntry(ZipArchiveEntry entry, boolean inMemory) throws ZipException { +public MigrationZipArchiveEntry(ZipArchiveEntry entry) throws ZipException { super(entry); -// No recalculation required, when in memory mode and not of type
[tomcat-jakartaee-migration] branch main updated: Add changelog entry
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git The following commit(s) were added to refs/heads/main by this push: new 90d2f46 Add changelog entry 90d2f46 is described below commit 90d2f46977cff54925bd626932e9be74300bcd8f Author: lihan AuthorDate: Thu Sep 15 13:14:34 2022 +0800 Add changelog entry --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index f532c10..abe51c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ ## 1.0.4 (in progress) -- TBD +- Correct a regression in the previous fix for [#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan) ## 1.0.3 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat-jakartaee-migration] branch main updated: Modify description of changelog entry
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git The following commit(s) were added to refs/heads/main by this push: new ca6e718 Modify description of changelog entry ca6e718 is described below commit ca6e71865eef5f324d46feaeed3b8d3b114b432e Author: lihan AuthorDate: Thu Sep 15 13:35:06 2022 +0800 Modify description of changelog entry --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index abe51c5..d724e8d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ ## 1.0.4 (in progress) -- Correct a regression in the previous fix for [#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan) +- Correct a wrong implementation in the previous fix for [#29](https://github.com/apache/tomcat-jakartaee-migration/issues/29) (lihan) ## 1.0.3 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Iterate over Map.entrySet() instead of Map.keySet()
This is an automated email from the ASF dual-hosted git repository. lihan 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 a26ccf25a1 Iterate over Map.entrySet() instead of Map.keySet() a26ccf25a1 is described below commit a26ccf25a17a1eea0e2a5ee7b6e0663c8e9bfd30 Author: lihan AuthorDate: Fri Sep 16 14:31:54 2022 +0800 Iterate over Map.entrySet() instead of Map.keySet() --- java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++-- java/org/apache/jasper/compiler/Generator.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 7b9e7f84fd..405a281b48 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1812,8 +1812,9 @@ public class WebdavServlet extends DefaultServlet { generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", XMLWriter.OPENING); -for (String errorPath : errorList.keySet()) { -int errorCode = errorList.get(errorPath).intValue(); +for (Map.Entry errorEntry : errorList.entrySet()) { +String errorPath = errorEntry.getKey(); +int errorCode = errorEntry.getValue().intValue(); generatedXML.writeElement("D", "response", XMLWriter.OPENING); diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index 34c6e41abf..41c8feb67a 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -1837,8 +1837,8 @@ class Generator { out.print(" + " + elemName); // Write remaining attributes -for (String attrName : map.keySet()) { -out.print(map.get(attrName)); +for (Entry attrEntry : map.entrySet()) { +out.print(attrEntry.getValue()); } // Does the have nested tags other than - 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: Iterate over Map.entrySet() instead of Map.keySet()
This is an automated email from the ASF dual-hosted git repository. lihan 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 c9fabe4875 Iterate over Map.entrySet() instead of Map.keySet() c9fabe4875 is described below commit c9fabe487530d50f5a798856f461487fe26677bd Author: lihan AuthorDate: Fri Sep 16 14:31:54 2022 +0800 Iterate over Map.entrySet() instead of Map.keySet() --- java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++-- java/org/apache/jasper/compiler/Generator.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 7b9e7f84fd..405a281b48 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1812,8 +1812,9 @@ public class WebdavServlet extends DefaultServlet { generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", XMLWriter.OPENING); -for (String errorPath : errorList.keySet()) { -int errorCode = errorList.get(errorPath).intValue(); +for (Map.Entry errorEntry : errorList.entrySet()) { +String errorPath = errorEntry.getKey(); +int errorCode = errorEntry.getValue().intValue(); generatedXML.writeElement("D", "response", XMLWriter.OPENING); diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index 7c90cfda53..175de77ff4 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -2061,8 +2061,8 @@ class Generator { out.print(" + " + elemName); // Write remaining attributes -for (String attrName : map.keySet()) { -out.print(map.get(attrName)); +for (Entry attrEntry : map.entrySet()) { +out.print(attrEntry.getValue()); } // Does the have nested tags other than - 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: Iterate over Map.entrySet() instead of Map.keySet()
This is an automated email from the ASF dual-hosted git repository. lihan 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 24b8f44fea Iterate over Map.entrySet() instead of Map.keySet() 24b8f44fea is described below commit 24b8f44feaa0a37c067b3199e8db61038ab93248 Author: lihan AuthorDate: Fri Sep 16 14:31:54 2022 +0800 Iterate over Map.entrySet() instead of Map.keySet() --- java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++-- java/org/apache/jasper/compiler/Generator.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 53cf4cb738..6b6f15cd3d 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1814,8 +1814,9 @@ public class WebdavServlet extends DefaultServlet { generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", XMLWriter.OPENING); -for (String errorPath : errorList.keySet()) { -int errorCode = errorList.get(errorPath).intValue(); +for (Map.Entry errorEntry : errorList.entrySet()) { +String errorPath = errorEntry.getKey(); +int errorCode = errorEntry.getValue().intValue(); generatedXML.writeElement("D", "response", XMLWriter.OPENING); diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index b359933bf3..c25d34fb1a 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -2051,8 +2051,8 @@ class Generator { out.print(" + " + elemName); // Write remaining attributes -for (String attrName : map.keySet()) { -out.print(map.get(attrName)); +for (Entry attrEntry : map.entrySet()) { +out.print(attrEntry.getValue()); } // Does the have nested tags other than - 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: Iterate over Map.entrySet() instead of Map.keySet()
This is an automated email from the ASF dual-hosted git repository. lihan 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 6800e83480 Iterate over Map.entrySet() instead of Map.keySet() 6800e83480 is described below commit 6800e8348025c323ff70b5438ef2796e8003a48d Author: lihan AuthorDate: Fri Sep 16 14:31:54 2022 +0800 Iterate over Map.entrySet() instead of Map.keySet() --- java/org/apache/catalina/servlets/WebdavServlet.java | 5 +++-- java/org/apache/jasper/compiler/Generator.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index a0bf15353f..9e54acbf77 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1811,8 +1811,9 @@ public class WebdavServlet extends DefaultServlet { generatedXML.writeElement("D", DEFAULT_NAMESPACE, "multistatus", XMLWriter.OPENING); -for (String errorPath : errorList.keySet()) { -int errorCode = errorList.get(errorPath).intValue(); +for (Map.Entry errorEntry : errorList.entrySet()) { +String errorPath = errorEntry.getKey(); +int errorCode = errorEntry.getValue().intValue(); generatedXML.writeElement("D", "response", XMLWriter.OPENING); diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index b0c83469ed..68224e5c50 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -2069,8 +2069,8 @@ class Generator { out.print(" + " + elemName); // Write remaining attributes -for (String attrName : map.keySet()) { -out.print(map.get(attrName)); +for (Entry attrEntry : map.entrySet()) { +out.print(attrEntry.getValue()); } // Does the have nested tags other than - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org