[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299773529 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { Review Comment: Why illegal state? Why not illegal argument exception? Mandated by Servlet 3.0 spec? If so, it should be noted in the Javadoc. ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +public InvalidParameterException(String message, int errorCode) { Review Comment: status code is the canonical name, no? ## webapps/docs/config/http.xml: ## @@ -148,20 +148,17 @@ files) obtained from the query string and, for POST requests, the request body if the content type is application/x-www-form-urlencoded or - multipart/form-data. Request parameters beyond this limit - will be ignored. A value of less than 0 means no limit. If not specified, - a default of 1000 is used. Note that FailedRequestFilter - filter can be used to reject requests that - exceed the limit. + multipart/form-data. Requests that exceed this limit will be + rejected. A value of less than 0 means no limit. If not specified, a + default of 1000 is used. The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by - setting this attribute to a value less than zero. If not specified, this - attribute is set to 2097152 (2 megabytes). Note that the - FailedRequestFilter - can be used to reject requests that exceed this limit. + setting this attribute to a value less than zero. Requests that exceed + this limit will be rejected. If not specified, this attribute is set to + 2097152 (2 megabytes). Review Comment: ditto ## webapps/docs/changelog.xml: ## @@ -113,6 +113,12 @@ provided error code during error page processing rather than assuming an error code of 500. (markt) + +Update the HTTP parameter handling to align with the changes in the +Jakarta Servlet 6.0 API. Invalid parameters and/or exceeding parameter Review Comment: Please also add the section which cases this change. ## webapps/docs/config/ajp.xml: ## @@ -152,20 +152,17 @@ files) obtained from the query string and, for POST requests, the request body if the content type is application/x-www-form-urlencoded or -
[Bug 66005] Apache crashes, if there is a tomcat server, which can not be resolved
https://bz.apache.org/bugzilla/show_bug.cgi?id=66005 --- Comment #24 from Michael Osipov --- The patch provided is highly not portable. Why not use internal attributes which mark symbols as public/private? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Mailing list RSS feeds not working
Hi, I have been using the RSS feeds linked from https://tomcat.apache.org/lists.html for following this and other Tomcat-related lists (https://tomcat.markmail.org/atom/+list:org%2Eapache%2Etomcat%2Edev), but it seems like it has stopped working some time during the past weeks. I just wanted to let you know in case it hadn't been noticed yet. Best regards, Sebastian Lövdahl -- Sebastian Lövdahl Senior System Engineer, Hibox Systems - https://www.hibox.tv sebastian.lovd...@hibox.tv - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299927091 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { Review Comment: Ack. I can update that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299935009 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +public InvalidParameterException(String message, int errorCode) { Review Comment: Yes and no. The generic name is status code but that refers to the full range of status codes. This is intended/expected to be a 4xx or 5xx status and they get referred to as error codes elsewhere in the Tomcat source around error handling. It is a case of picking which is the best to be consistent with. I think it can be argued either way. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299935328 ## webapps/docs/changelog.xml: ## @@ -113,6 +113,12 @@ provided error code during error page processing rather than assuming an error code of 500. (markt) + +Update the HTTP parameter handling to align with the changes in the +Jakarta Servlet 6.0 API. Invalid parameters and/or exceeding parameter Review Comment: The change is only in the Javadoc. I'll note that in the change log -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299936723 ## webapps/docs/config/http.xml: ## @@ -148,20 +148,17 @@ files) obtained from the query string and, for POST requests, the request body if the content type is application/x-www-form-urlencoded or - multipart/form-data. Request parameters beyond this limit - will be ignored. A value of less than 0 means no limit. If not specified, - a default of 1000 is used. Note that FailedRequestFilter - filter can be used to reject requests that - exceed the limit. + multipart/form-data. Requests that exceed this limit will be + rejected. A value of less than 0 means no limit. If not specified, a + default of 1000 is used. The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by - setting this attribute to a value less than zero. If not specified, this - attribute is set to 2097152 (2 megabytes). Note that the - FailedRequestFilter - can be used to reject requests that exceed this limit. + setting this attribute to a value less than zero. Requests that exceed + this limit will be rejected. If not specified, this attribute is set to + 2097152 (2 megabytes). Review Comment: Fair point. I don't think we make the distinction elsewhere but I don't see the harm in being specific. Worth a global search and replace I think. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299969203 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +public InvalidParameterException(String message, int errorCode) { Review Comment: Then one would expect a check for `errorCode >= 400`, no? ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +public InvalidParameterException(String message, int errorCode) { Review Comment: Then one would expect a check for `errorCode >= 400`, no? I agree on the either way. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1299969607 ## webapps/docs/config/http.xml: ## @@ -148,20 +148,17 @@ files) obtained from the query string and, for POST requests, the request body if the content type is application/x-www-form-urlencoded or - multipart/form-data. Request parameters beyond this limit - will be ignored. A value of less than 0 means no limit. If not specified, - a default of 1000 is used. Note that FailedRequestFilter - filter can be used to reject requests that - exceed the limit. + multipart/form-data. Requests that exceed this limit will be + rejected. A value of less than 0 means no limit. If not specified, a + default of 1000 is used. The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by - setting this attribute to a value less than zero. If not specified, this - attribute is set to 2097152 (2 megabytes). Note that the - FailedRequestFilter - can be used to reject requests that exceed this limit. + setting this attribute to a value less than zero. Requests that exceed + this limit will be rejected. If not specified, this attribute is set to + 2097152 (2 megabytes). Review Comment: Agreed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Mailing list RSS feeds not working
On 21/08/2023 02:53, Sebastian Lövdahl wrote: Hi, I have been using the RSS feeds linked from https://tomcat.apache.org/lists.html for following this and other Tomcat-related lists (https://tomcat.markmail.org/atom/+list:org%2Eapache%2Etomcat%2Edev), but it seems like it has stopped working some time during the past weeks. I just wanted to let you know in case it hadn't been noticed yet. Thanks for the email. I noticed the site formatting was broken a few weeks ago but assumed it was a temporary error. It appears that assumption was incorrect. I'll try contacting the MarkMail folks to see what is going on. In the meantime, I'll hide the markmail links. I hope it is only a temporary issue as MarkMail has been my preferred choice for searching the Tomcat archives for a very long time. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300034970 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +public InvalidParameterException(String message, int errorCode) { Review Comment: And do what when the check fails? Throw a different runtime exception and trigger a 500 response. An exception constructor throwing a runtime exception just feels wrong to me. Given this is a Tomcat internal class I think we can safely skip the check. Some Javadoc wouldn't hurt though. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300043089 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +public InvalidParameterException(String message, int errorCode) { Review Comment: Agree, docs are good enough here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1911825 - in /tomcat/site/trunk: docs/lists.html xdocs/lists.xml
Author: markt Date: Mon Aug 21 13:24:44 2023 New Revision: 1911825 URL: http://svn.apache.org/viewvc?rev=1911825&view=rev Log: Remove referencs to markmail.org as it appears to be off-line Modified: tomcat/site/trunk/docs/lists.html tomcat/site/trunk/xdocs/lists.xml Modified: tomcat/site/trunk/docs/lists.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/lists.html?rev=1911825&r1=1911824&r2=1911825&view=diff == --- tomcat/site/trunk/docs/lists.html (original) +++ tomcat/site/trunk/docs/lists.html Mon Aug 21 13:24:44 2023 @@ -39,10 +39,9 @@ message being marked as spam: The Developer list is for people interested in helping with the development and debugging of the server. -Formatted archives are available in several places including https://lists.apache.org/list.html?us...@tomcat.apache.org";>the Apache Mail -Archives, https://marc.info/"; rel="nofollow">MARC, and -https://tomcat.markmail.org/"; rel="nofollow">MarkMail. The raw mbox -files are also available. +Formatted archives are available in several places including https://lists.apache.org/list.html?us...@tomcat.apache.org";>the Apache +Mail Archives, and https://marc.info/"; rel="nofollow">MARC. The +raw mbox files are also available. tomcat-users @@ -142,16 +141,10 @@ Tomcat questions to Eric or Rick themsel at the ASF with https://lists.apache.org/list.html?us...@tomcat.apache.org";>Pony Mail, or searchable archives at -https://marc.info/?l=tomcat-user"; rel="nofollow">MARC, -https://markmail.org/list/org.apache.tomcat.user/"; rel="nofollow">MarkMail and +https://marc.info/?l=tomcat-user"; rel="nofollow">MARC and https://www.mail-archive.com/users@tomcat.apache.org/"; rel="nofollow">Mail Archive - - RSS: - at https://tomcat.markmail.org/atom/+list:org%2Eapache%2Etomcat%2Eusers"; rel="nofollow">MarkMail - - tomcat-announce @@ -197,15 +190,9 @@ other project announcements. at the ASF with https://lists.apache.org/list.html?annou...@tomcat.apache.org";>Pony Mail, or searchable archives at -https://markmail.org/list/org.apache.tomcat.announce/"; rel="nofollow">MarkMail and https://www.mail-archive.com/announce@tomcat.apache.org/"; rel="nofollow">Mail Archive - - RSS: - at https://tomcat.markmail.org/atom/+list:org%2Eapache%2Etomcat%2Eannounce"; rel="nofollow">MarkMail - - tomcat-dev @@ -272,16 +259,10 @@ issues. Other questions will be ignored. at the ASF with https://lists.apache.org/list.html?dev@tomcat.apache.org";>Pony Mail, or searchable archives at -https://marc.info/?l=tomcat-dev"; rel="nofollow">MARC, -https://markmail.org/list/org.apache.tomcat.dev/"; rel="nofollow">MarkMail and +https://marc.info/?l=tomcat-dev"; rel="nofollow">MARC and https://www.mail-archive.com/dev@tomcat.apache.org/"; rel="nofollow">Mail Archive - - RSS: - at https://tomcat.markmail.org/atom/+list:org%2Eapache%2Etomcat%2Edev"; rel="nofollow">MarkMail - - taglibs-user @@ -347,16 +328,10 @@ Note: This mailing list was formerly kno at the ASF with https://lists.apache.org/list.html?taglibs-u...@tomcat.apache.org";>Pony Mail, or searchable archives at -https://markmail.org/list/org.apache.jakarta.taglibs-user/"; rel="nofollow">MarkMail and https://www.mail-archive.com/taglibs-user@tomcat.apache.org/"; rel="nofollow">Mail Archive (also https://www.mail-archive.com/taglibs-user@jakarta.apache.org/"; rel="nofollow">older archives) - - RSS: - at https://jakarta.markmail.org/atom/+list:org%2Eapache%2Ejakarta%2Etaglibs-user"; rel="nofollow">MarkMail - - Copyright © 1999-2023, The Apache Software Foundation Modified: tomcat/site/trunk/xdocs/lists.xml URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/lists.xml?rev=1911825&r1=1911824&r2=1911825&view=diff == --- tomcat/site/trunk/xdocs/lists.xml (original) +++ tomcat/site/trunk/xdocs/lists.xml Mon Aug 21 13:24:44 2023 @@ -48,10 +48,9 @@ The Developer helping with the development and debugging of the server. Formatted archives are available in several places including https://lists.apache.org/list.html?us...@tomcat.apache.org";>the Apache Mail -Archives, https://marc.info/"; rel="nofollow">MARC, and -https://tomcat.markmail.org/"; rel="nofollow">MarkMail. The raw mbox -files are also available. +href="https://lists.apache.org/list.html?us...@tomcat.apache.org";>the Apache +Mail Archives, and https://marc.info/"; rel="nofollow">MARC. The +raw mbox files are also available. @@ -153,18 +152,10 @@ Tomcat questions to Eric or Rick themsel at the ASF with https://lists.apache.org/list.html?us...@tomcat.apache.org";>Pony Mail, or searchable archives at -https://marc.info/?l=tomcat-user"; rel="nofollow">MARC,
[Bug 66005] Apache crashes, if there is a tomcat server, which can not be resolved
https://bz.apache.org/bugzilla/show_bug.cgi?id=66005 --- Comment #25 from Rainer Jung --- Not sure how highly nonportable, at least it uses libtool. Attributes are often used in GCC style. Do you have a concrete suggestion how to use them in a portable way to only export the jk_handler symbol? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new a1a1c8339e Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes a1a1c8339e is described below commit a1a1c8339ea99a71f9c2430495385e3fd5b2b5fa Author: Mark Thomas AuthorDate: Mon Aug 21 12:00:20 2023 -0700 Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes --- conf/web.xml | 2 +- java/jakarta/servlet/http/Cookie.java | 4 ++-- java/org/apache/catalina/connector/Connector.java | 4 ++-- .../catalina/ha/deploy/FileMessageFactory.java | 2 +- .../apache/catalina/manager/StatusTransformer.java | 8 .../apache/catalina/servlets/DefaultServlet.java | 2 +- java/org/apache/catalina/ssi/SSIFsize.java | 23 +++--- .../group/interceptors/LocalStrings.properties | 12 +-- .../group/interceptors/LocalStrings_cs.properties | 12 +-- .../group/interceptors/LocalStrings_es.properties | 10 +- .../group/interceptors/LocalStrings_fr.properties | 12 +-- .../group/interceptors/LocalStrings_ja.properties | 12 +-- .../group/interceptors/LocalStrings_ko.properties | 12 +-- .../interceptors/LocalStrings_pt_BR.properties | 12 +-- .../interceptors/LocalStrings_zh_CN.properties | 12 +-- .../interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- .../catalina/webresources/LocalStrings.properties | 6 +++--- .../webresources/LocalStrings_fr.properties| 4 ++-- .../webresources/LocalStrings_ja.properties| 6 +++--- .../webresources/LocalStrings_ko.properties| 6 +++--- .../webresources/LocalStrings_zh_CN.properties | 6 +++--- .../catalina/webresources/mbeans-descriptors.xml | 6 +++--- .../http/fileupload/disk/DiskFileItemFactory.java | 2 +- .../catalina/core/TestSwallowAbortedUploads.java | 2 +- .../catalina/tribes/demos/ChannelCreator.java | 2 +- .../tribes/test/transport/SocketNioReceive.java| 4 ++-- .../tribes/test/transport/SocketNioSend.java | 2 +- .../test/transport/SocketNioValidateSend.java | 2 +- .../tribes/test/transport/SocketReceive.java | 4 ++-- .../tribes/test/transport/SocketTribesReceive.java | 4 ++-- .../test/transport/SocketValidateReceive.java | 4 ++-- test/org/apache/tomcat/util/net/TestSsl.java | 4 ++-- webapps/docs/changelog.xml | 12 +++ webapps/docs/config/ajp.xml| 6 +++--- webapps/docs/config/cluster-interceptor.xml| 2 +- webapps/docs/config/http.xml | 8 webapps/docs/config/resources.xml | 2 +- webapps/docs/config/systemprops.xml| 4 ++-- webapps/docs/default-servlet.xml | 2 +- webapps/docs/security-howto.xml| 4 ++-- webapps/docs/windows-service-howto.xml | 6 +++--- .../compressionFilters/CompressionFilter.java | 2 +- .../CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml| 2 +- 46 files changed, 137 insertions(+), 124 deletions(-) diff --git a/conf/web.xml b/conf/web.xml index 1a5cbfecd0..9ec69cc66e 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -78,7 +78,7 @@ - + diff --git a/java/jakarta/servlet/http/Cookie.java b/java/jakarta/servlet/http/Cookie.java index 57d69e3b8a..4fc87e5516 100644 --- a/java/jakarta/servlet/http/Cookie.java +++ b/java/jakarta/servlet/http/Cookie.java @@ -35,8 +35,8 @@ import java.util.TreeMap; * sparingly to improve the interoperability of your servlets. * * The servlet sends cookies to the browser by using the {@link HttpServletResponse#addCookie} method, which adds fields - * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 20 cookies - * for each Web server, 300 cookies total, and may limit cookie size to 4 KB each. + * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 50 cookies + * for each domain, 3000 cookies total, and may limit cookie size to 4 KiB each. * * The browser returns cookies to the servlet by adding fields to HTTP request headers. Cookies can be retrieved from a * request by using the {@link HttpServletRequest#getCookies} method. Several cookies might have the same name but diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index b860ebd68a..a435252fb8 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/cat
[tomcat] branch 10.1.x updated: Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes
This is an automated email from the ASF dual-hosted git repository. markt 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 3959e1eba2 Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes 3959e1eba2 is described below commit 3959e1eba2a926c4e5b71d9438cf8b31b94c6e3c Author: Mark Thomas AuthorDate: Mon Aug 21 12:00:20 2023 -0700 Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes --- conf/web.xml | 2 +- java/jakarta/servlet/http/Cookie.java | 4 ++-- java/org/apache/catalina/connector/Connector.java | 4 ++-- .../catalina/ha/deploy/FileMessageFactory.java | 2 +- .../apache/catalina/manager/StatusTransformer.java | 8 .../apache/catalina/servlets/DefaultServlet.java | 2 +- java/org/apache/catalina/ssi/SSIFsize.java | 23 +++--- .../group/interceptors/LocalStrings.properties | 12 +-- .../group/interceptors/LocalStrings_cs.properties | 12 +-- .../group/interceptors/LocalStrings_es.properties | 10 +- .../group/interceptors/LocalStrings_fr.properties | 12 +-- .../group/interceptors/LocalStrings_ja.properties | 12 +-- .../group/interceptors/LocalStrings_ko.properties | 12 +-- .../interceptors/LocalStrings_pt_BR.properties | 12 +-- .../interceptors/LocalStrings_zh_CN.properties | 12 +-- .../interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- .../catalina/webresources/LocalStrings.properties | 6 +++--- .../webresources/LocalStrings_fr.properties| 4 ++-- .../webresources/LocalStrings_ja.properties| 6 +++--- .../webresources/LocalStrings_ko.properties| 6 +++--- .../webresources/LocalStrings_zh_CN.properties | 6 +++--- .../catalina/webresources/mbeans-descriptors.xml | 6 +++--- .../http/fileupload/disk/DiskFileItemFactory.java | 2 +- .../catalina/core/TestSwallowAbortedUploads.java | 2 +- .../catalina/tribes/demos/ChannelCreator.java | 2 +- .../tribes/test/transport/SocketNioReceive.java| 4 ++-- .../tribes/test/transport/SocketNioSend.java | 2 +- .../test/transport/SocketNioValidateSend.java | 2 +- .../tribes/test/transport/SocketReceive.java | 4 ++-- .../tribes/test/transport/SocketTribesReceive.java | 4 ++-- .../test/transport/SocketValidateReceive.java | 4 ++-- test/org/apache/tomcat/util/net/TestSsl.java | 4 ++-- webapps/docs/changelog.xml | 12 +++ webapps/docs/config/ajp.xml| 6 +++--- webapps/docs/config/cluster-interceptor.xml| 2 +- webapps/docs/config/http.xml | 8 webapps/docs/config/resources.xml | 2 +- webapps/docs/config/systemprops.xml| 4 ++-- webapps/docs/default-servlet.xml | 2 +- webapps/docs/security-howto.xml| 4 ++-- webapps/docs/windows-service-howto.xml | 6 +++--- .../compressionFilters/CompressionFilter.java | 2 +- .../CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml| 2 +- 46 files changed, 137 insertions(+), 124 deletions(-) diff --git a/conf/web.xml b/conf/web.xml index 8f706c8290..d01ab9b005 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -78,7 +78,7 @@ - + diff --git a/java/jakarta/servlet/http/Cookie.java b/java/jakarta/servlet/http/Cookie.java index 57d69e3b8a..4fc87e5516 100644 --- a/java/jakarta/servlet/http/Cookie.java +++ b/java/jakarta/servlet/http/Cookie.java @@ -35,8 +35,8 @@ import java.util.TreeMap; * sparingly to improve the interoperability of your servlets. * * The servlet sends cookies to the browser by using the {@link HttpServletResponse#addCookie} method, which adds fields - * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 20 cookies - * for each Web server, 300 cookies total, and may limit cookie size to 4 KB each. + * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 50 cookies + * for each domain, 3000 cookies total, and may limit cookie size to 4 KiB each. * * The browser returns cookies to the servlet by adding fields to HTTP request headers. Cookies can be retrieved from a * request by using the {@link HttpServletRequest#getCookies} method. Several cookies might have the same name but diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index 31acb19fa3..61c7f05a4e 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache
[tomcat] branch 9.0.x updated: Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new dbb75e2fc8 Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes dbb75e2fc8 is described below commit dbb75e2fc83dfedc133162ef1dfe31b58dbbac0c Author: Mark Thomas AuthorDate: Mon Aug 21 12:00:20 2023 -0700 Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes --- conf/web.xml | 2 +- java/javax/servlet/http/Cookie.java| 4 ++-- java/org/apache/catalina/connector/Connector.java | 4 ++-- .../catalina/ha/deploy/FileMessageFactory.java | 2 +- .../apache/catalina/manager/StatusTransformer.java | 8 .../apache/catalina/servlets/DefaultServlet.java | 2 +- java/org/apache/catalina/ssi/SSIFsize.java | 23 +++--- .../group/interceptors/LocalStrings.properties | 12 +-- .../group/interceptors/LocalStrings_cs.properties | 12 +-- .../group/interceptors/LocalStrings_es.properties | 10 +- .../group/interceptors/LocalStrings_fr.properties | 12 +-- .../group/interceptors/LocalStrings_ja.properties | 12 +-- .../group/interceptors/LocalStrings_ko.properties | 12 +-- .../interceptors/LocalStrings_pt_BR.properties | 12 +-- .../interceptors/LocalStrings_zh_CN.properties | 12 +-- .../interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- .../catalina/webresources/LocalStrings.properties | 6 +++--- .../webresources/LocalStrings_fr.properties| 4 ++-- .../webresources/LocalStrings_ja.properties| 6 +++--- .../webresources/LocalStrings_ko.properties| 6 +++--- .../webresources/LocalStrings_zh_CN.properties | 6 +++--- .../catalina/webresources/mbeans-descriptors.xml | 6 +++--- .../http/fileupload/disk/DiskFileItemFactory.java | 2 +- .../catalina/core/TestSwallowAbortedUploads.java | 2 +- .../catalina/tribes/demos/ChannelCreator.java | 2 +- .../tribes/test/transport/SocketNioReceive.java| 4 ++-- .../tribes/test/transport/SocketNioSend.java | 2 +- .../test/transport/SocketNioValidateSend.java | 2 +- .../tribes/test/transport/SocketReceive.java | 4 ++-- .../tribes/test/transport/SocketTribesReceive.java | 4 ++-- .../test/transport/SocketValidateReceive.java | 4 ++-- test/org/apache/tomcat/util/net/TestSsl.java | 4 ++-- webapps/docs/changelog.xml | 12 +++ webapps/docs/config/ajp.xml| 6 +++--- webapps/docs/config/cluster-interceptor.xml| 2 +- webapps/docs/config/http.xml | 8 webapps/docs/config/resources.xml | 2 +- webapps/docs/config/systemprops.xml| 2 +- webapps/docs/default-servlet.xml | 2 +- webapps/docs/security-howto.xml| 4 ++-- webapps/docs/windows-service-howto.xml | 6 +++--- .../compressionFilters/CompressionFilter.java | 2 +- .../CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml| 2 +- 46 files changed, 136 insertions(+), 123 deletions(-) diff --git a/conf/web.xml b/conf/web.xml index 0b8b1edfe7..2c7874dcc0 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -73,7 +73,7 @@ - + diff --git a/java/javax/servlet/http/Cookie.java b/java/javax/servlet/http/Cookie.java index 0415a1b618..8652292748 100644 --- a/java/javax/servlet/http/Cookie.java +++ b/java/javax/servlet/http/Cookie.java @@ -34,8 +34,8 @@ import java.util.ResourceBundle; * sparingly to improve the interoperability of your servlets. * * The servlet sends cookies to the browser by using the {@link HttpServletResponse#addCookie} method, which adds fields - * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 20 cookies - * for each Web server, 300 cookies total, and may limit cookie size to 4 KB each. + * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 50 cookies + * for each domain, 3000 cookies total, and may limit cookie size to 4 KiB each. * * The browser returns cookies to the servlet by adding fields to HTTP request headers. Cookies can be retrieved from a * request by using the {@link HttpServletRequest#getCookies} method. Several cookies might have the same name but diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index fb77d9fb31..fad5e558ea 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/cata
[tomcat] branch 8.5.x updated: Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new ffd30c21dc Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes ffd30c21dc is described below commit ffd30c21dc98340a1966c5f0a87cec357c21a827 Author: Mark Thomas AuthorDate: Mon Aug 21 12:00:20 2023 -0700 Use MiB for 1024 * 1204 bytes and KiB for 1024 bytes --- conf/web.xml | 2 +- java/javax/servlet/http/Cookie.java| 4 ++-- java/org/apache/catalina/connector/Connector.java | 4 ++-- .../catalina/ha/deploy/FileMessageFactory.java | 2 +- .../apache/catalina/manager/StatusTransformer.java | 8 .../apache/catalina/servlets/DefaultServlet.java | 2 +- java/org/apache/catalina/ssi/SSIFsize.java | 23 +++--- .../group/interceptors/LocalStrings.properties | 12 +-- .../group/interceptors/LocalStrings_es.properties | 10 +- .../group/interceptors/LocalStrings_fr.properties | 12 +-- .../group/interceptors/LocalStrings_ja.properties | 12 +-- .../group/interceptors/LocalStrings_ko.properties | 12 +-- .../interceptors/LocalStrings_zh_CN.properties | 12 +-- .../interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- .../catalina/webresources/LocalStrings.properties | 6 +++--- .../webresources/LocalStrings_fr.properties| 4 ++-- .../webresources/LocalStrings_ja.properties| 6 +++--- .../webresources/LocalStrings_ko.properties| 6 +++--- .../webresources/LocalStrings_zh_CN.properties | 6 +++--- .../catalina/webresources/mbeans-descriptors.xml | 6 +++--- .../http/fileupload/disk/DiskFileItemFactory.java | 2 +- .../catalina/core/TestSwallowAbortedUploads.java | 2 +- .../catalina/tribes/demos/ChannelCreator.java | 2 +- .../tribes/test/transport/SocketNioReceive.java| 4 ++-- .../tribes/test/transport/SocketNioSend.java | 2 +- .../test/transport/SocketNioValidateSend.java | 2 +- .../tribes/test/transport/SocketReceive.java | 4 ++-- .../tribes/test/transport/SocketTribesReceive.java | 4 ++-- .../test/transport/SocketValidateReceive.java | 4 ++-- test/org/apache/tomcat/util/net/TestSsl.java | 4 ++-- webapps/docs/changelog.xml | 12 +++ webapps/docs/config/ajp.xml| 6 +++--- webapps/docs/config/cluster-interceptor.xml| 2 +- webapps/docs/config/http.xml | 8 webapps/docs/config/resources.xml | 2 +- webapps/docs/config/systemprops.xml| 2 +- webapps/docs/default-servlet.xml | 2 +- webapps/docs/security-howto.xml| 4 ++-- webapps/docs/windows-service-howto.xml | 6 +++--- .../compressionFilters/CompressionFilter.java | 2 +- .../CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml| 2 +- 44 files changed, 124 insertions(+), 111 deletions(-) diff --git a/conf/web.xml b/conf/web.xml index 01eacede64..f81950e00e 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -73,7 +73,7 @@ - + diff --git a/java/javax/servlet/http/Cookie.java b/java/javax/servlet/http/Cookie.java index cb0169a269..924fa999c0 100644 --- a/java/javax/servlet/http/Cookie.java +++ b/java/javax/servlet/http/Cookie.java @@ -34,8 +34,8 @@ import java.util.ResourceBundle; * sparingly to improve the interoperability of your servlets. * * The servlet sends cookies to the browser by using the {@link HttpServletResponse#addCookie} method, which adds fields - * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 20 cookies - * for each Web server, 300 cookies total, and may limit cookie size to 4 KB each. + * to HTTP response headers to send cookies to the browser, one at a time. The browser is expected to support 50 cookies + * for each domain, 3000 cookies total, and may limit cookie size to 4 KiB each. * * The browser returns cookies to the servlet by adding fields to HTTP request headers. Cookies can be retrieved from a * request by using the {@link HttpServletRequest#getCookies} method. Several cookies might have the same name but diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index 61f995be9b..1f089ea47a 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -203,13 +203,13 @@ public class Connector extends LifecycleMBeanBase { protected int maxParameterCou
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300652715 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + * + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +/** + * Construct a new exception with the given message. + * + * @param message The message to use for the exception + */ +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given message and error code. + * + * @param message The message to use for the exception + * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. + */ +public InvalidParameterException(String message, int errorCode) { +this(message, null, errorCode); +} + + +/** + * Construct a new exception with the given message and cause. + * + * @param message The message to use for the exception + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(String message, Throwable cause) { +this(message, cause, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given cause. The message for this exception will be generated by calling + * {@code cause.toString()}. + * + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(Throwable cause) { +this(cause.toString(), cause, HttpServletResponse.SC_BAD_REQUEST); Review Comment: Unless you override `toString() this will very likely cause a duplicate message in the strack trace. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300652715 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + * + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +/** + * Construct a new exception with the given message. + * + * @param message The message to use for the exception + */ +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given message and error code. + * + * @param message The message to use for the exception + * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. + */ +public InvalidParameterException(String message, int errorCode) { +this(message, null, errorCode); +} + + +/** + * Construct a new exception with the given message and cause. + * + * @param message The message to use for the exception + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(String message, Throwable cause) { +this(message, cause, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given cause. The message for this exception will be generated by calling + * {@code cause.toString()}. + * + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(Throwable cause) { +this(cause.toString(), cause, HttpServletResponse.SC_BAD_REQUEST); Review Comment: Unless you override `toString()` this will very likely cause a duplicate message in the strack trace. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300656508 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + * + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +/** + * Construct a new exception with the given message. + * + * @param message The message to use for the exception + */ +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given message and error code. + * + * @param message The message to use for the exception + * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. + */ +public InvalidParameterException(String message, int errorCode) { +this(message, null, errorCode); +} + + +/** + * Construct a new exception with the given message and cause. + * + * @param message The message to use for the exception + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(String message, Throwable cause) { +this(message, cause, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given cause. The message for this exception will be generated by calling + * {@code cause.toString()}. + * + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(Throwable cause) { +this(cause.toString(), cause, HttpServletResponse.SC_BAD_REQUEST); Review Comment: This is consistent with the default implementation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300658108 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + * + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +/** + * Construct a new exception with the given message. + * + * @param message The message to use for the exception + */ +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given message and error code. + * + * @param message The message to use for the exception + * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. + */ +public InvalidParameterException(String message, int errorCode) { +this(message, null, errorCode); +} + + +/** + * Construct a new exception with the given message and cause. + * + * @param message The message to use for the exception + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(String message, Throwable cause) { +this(message, cause, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given cause. The message for this exception will be generated by calling + * {@code cause.toString()}. + * + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(Throwable cause) { +this(cause.toString(), cause, HttpServletResponse.SC_BAD_REQUEST); Review Comment: Which default one you mean? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on a diff in pull request #646: Parameter error handling
markt-asf commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1300661077 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + * + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +/** + * Construct a new exception with the given message. + * + * @param message The message to use for the exception + */ +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given message and error code. + * + * @param message The message to use for the exception + * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. + */ +public InvalidParameterException(String message, int errorCode) { +this(message, null, errorCode); +} + + +/** + * Construct a new exception with the given message and cause. + * + * @param message The message to use for the exception + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(String message, Throwable cause) { +this(message, cause, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given cause. The message for this exception will be generated by calling + * {@code cause.toString()}. + * + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(Throwable cause) { +this(cause.toString(), cause, HttpServletResponse.SC_BAD_REQUEST); Review Comment: The Throwable constructor: `public Throwable(Throwable cause) { ...` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix regex replace error
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 7b39f1c1fb Fix regex replace error 7b39f1c1fb is described below commit 7b39f1c1fbbcac032c4f664ff1b4c190915fe5af Author: Mark Thomas AuthorDate: Mon Aug 21 14:32:55 2023 -0700 Fix regex replace error --- test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java | 4 ++-- test/org/apache/catalina/tribes/test/transport/SocketNioSend.java | 2 +- .../apache/catalina/tribes/test/transport/SocketNioValidateSend.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketReceive.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketSend.java| 4 ++-- .../apache/catalina/tribes/test/transport/SocketTribesReceive.java| 2 +- .../apache/catalina/tribes/test/transport/SocketValidateReceive.java | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java index 32122ea8d6..18a3b0a295 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java @@ -57,7 +57,7 @@ public class SocketNioReceive { try { Thread.sleep(5000); if ( start != 0 ) { -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+" accepts "+accept+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+" accepts "+accept+", total "+mb+" MiB"); } }catch (Throwable x) { x.printStackTrace(); @@ -82,7 +82,7 @@ public class SocketNioReceive { if ( ( (count) % 1) == 0) { long time = System.currentTimeMillis(); seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+", total "+mb+" MiB"); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java index 567e2f9965..a8246d08b9 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java @@ -89,7 +89,7 @@ public class SocketNioSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java index 49f4964b5e..a3107b78da 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java @@ -86,7 +86,7 @@ public class SocketNioValidateSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java index 0faa8786e7..eb95f36e86 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java @@ -84,7 +84,7 @@ public class SocketReceive { long time = System.currentTimeMillis(); double seconds = ((double)(time-start))/1000; System.out.println("Throughput " + df.format(mb/seconds) + -" MiBseconds messages " + count + ", total " + mb + +" MiB/s messages " + count
[tomcat] branch 10.1.x updated: Fix regex replace error
This is an automated email from the ASF dual-hosted git repository. markt 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 aeefa111de Fix regex replace error aeefa111de is described below commit aeefa111de1f3644b32403a0163e5784267504a8 Author: Mark Thomas AuthorDate: Mon Aug 21 14:32:55 2023 -0700 Fix regex replace error --- test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java | 4 ++-- test/org/apache/catalina/tribes/test/transport/SocketNioSend.java | 2 +- .../apache/catalina/tribes/test/transport/SocketNioValidateSend.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketReceive.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketSend.java| 4 ++-- .../apache/catalina/tribes/test/transport/SocketTribesReceive.java| 2 +- .../apache/catalina/tribes/test/transport/SocketValidateReceive.java | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java index 32122ea8d6..18a3b0a295 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java @@ -57,7 +57,7 @@ public class SocketNioReceive { try { Thread.sleep(5000); if ( start != 0 ) { -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+" accepts "+accept+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+" accepts "+accept+", total "+mb+" MiB"); } }catch (Throwable x) { x.printStackTrace(); @@ -82,7 +82,7 @@ public class SocketNioReceive { if ( ( (count) % 1) == 0) { long time = System.currentTimeMillis(); seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+", total "+mb+" MiB"); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java index 567e2f9965..a8246d08b9 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java @@ -89,7 +89,7 @@ public class SocketNioSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java index 49f4964b5e..a3107b78da 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java @@ -86,7 +86,7 @@ public class SocketNioValidateSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java index 0faa8786e7..eb95f36e86 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java @@ -84,7 +84,7 @@ public class SocketReceive { long time = System.currentTimeMillis(); double seconds = ((double)(time-start))/1000; System.out.println("Throughput " + df.format(mb/seconds) + -" MiBseconds messages " + count + ", total " + mb + +" MiB/s messages " + c
[tomcat] branch 9.0.x updated: Fix regex replace error
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new e49378e227 Fix regex replace error e49378e227 is described below commit e49378e22749ff11cd0de7a0c92d7560da030188 Author: Mark Thomas AuthorDate: Mon Aug 21 14:32:55 2023 -0700 Fix regex replace error --- test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java | 4 ++-- test/org/apache/catalina/tribes/test/transport/SocketNioSend.java | 2 +- .../apache/catalina/tribes/test/transport/SocketNioValidateSend.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketReceive.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketSend.java| 4 ++-- .../apache/catalina/tribes/test/transport/SocketTribesReceive.java| 2 +- .../apache/catalina/tribes/test/transport/SocketValidateReceive.java | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java index 32122ea8d6..18a3b0a295 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java @@ -57,7 +57,7 @@ public class SocketNioReceive { try { Thread.sleep(5000); if ( start != 0 ) { -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+" accepts "+accept+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+" accepts "+accept+", total "+mb+" MiB"); } }catch (Throwable x) { x.printStackTrace(); @@ -82,7 +82,7 @@ public class SocketNioReceive { if ( ( (count) % 1) == 0) { long time = System.currentTimeMillis(); seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+", total "+mb+" MiB"); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java index 567e2f9965..a8246d08b9 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java @@ -89,7 +89,7 @@ public class SocketNioSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java index 49f4964b5e..a3107b78da 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java @@ -86,7 +86,7 @@ public class SocketNioValidateSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java index 0faa8786e7..eb95f36e86 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java @@ -84,7 +84,7 @@ public class SocketReceive { long time = System.currentTimeMillis(); double seconds = ((double)(time-start))/1000; System.out.println("Throughput " + df.format(mb/seconds) + -" MiBseconds messages " + count + ", total " + mb + +" MiB/s messages " + cou
[tomcat] branch 8.5.x updated: Fix regex replace error
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 9c3957dd83 Fix regex replace error 9c3957dd83 is described below commit 9c3957dd83fec4303af8ea497e501f28100befe4 Author: Mark Thomas AuthorDate: Mon Aug 21 14:32:55 2023 -0700 Fix regex replace error --- test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java | 4 ++-- test/org/apache/catalina/tribes/test/transport/SocketNioSend.java | 2 +- .../apache/catalina/tribes/test/transport/SocketNioValidateSend.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketReceive.java | 2 +- test/org/apache/catalina/tribes/test/transport/SocketSend.java| 4 ++-- .../apache/catalina/tribes/test/transport/SocketTribesReceive.java| 2 +- .../apache/catalina/tribes/test/transport/SocketValidateReceive.java | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java index 32122ea8d6..18a3b0a295 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java @@ -57,7 +57,7 @@ public class SocketNioReceive { try { Thread.sleep(5000); if ( start != 0 ) { -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+" accepts "+accept+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+" accepts "+accept+", total "+mb+" MiB"); } }catch (Throwable x) { x.printStackTrace(); @@ -82,7 +82,7 @@ public class SocketNioReceive { if ( ( (count) % 1) == 0) { long time = System.currentTimeMillis(); seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, messages "+count+", total "+mb+" MiB"); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, messages "+count+", total "+mb+" MiB"); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java index 567e2f9965..a8246d08b9 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioSend.java @@ -89,7 +89,7 @@ public class SocketNioSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java index 49f4964b5e..a3107b78da 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java @@ -86,7 +86,7 @@ public class SocketNioValidateSend { if ( ( (++count) % 1) == 0) { long time = System.currentTimeMillis(); double seconds = ( (double) (time - start)) / 1000; -System.out.println("Throughput " + df.format(mb / seconds) + " MiBseconds, total "+mb+" MiB total "+total+" bytes."); +System.out.println("Throughput " + df.format(mb / seconds) + " MiB/s, total "+mb+" MiB total "+total+" bytes."); } } diff --git a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java index 0faa8786e7..eb95f36e86 100644 --- a/test/org/apache/catalina/tribes/test/transport/SocketReceive.java +++ b/test/org/apache/catalina/tribes/test/transport/SocketReceive.java @@ -84,7 +84,7 @@ public class SocketReceive { long time = System.currentTimeMillis(); double seconds = ((double)(time-start))/1000; System.out.println("Throughput " + df.format(mb/seconds) + -" MiBseconds messages " + count + ", total " + mb + +" MiB/s messages " + cou
[tomcat] branch main updated: Fix formatting. There should be a space between number and unit.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new b55774b615 Fix formatting. There should be a space between number and unit. b55774b615 is described below commit b55774b615ece26e4b5d70f53a701aa83131d8d9 Author: Mark Thomas AuthorDate: Mon Aug 21 16:12:18 2023 -0700 Fix formatting. There should be a space between number and unit. --- java/org/apache/catalina/connector/Connector.java | 4 ++-- java/org/apache/catalina/ha/deploy/FileMessageFactory.java | 2 +- .../catalina/tribes/group/interceptors/LocalStrings.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_cs.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_es.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_fr.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ja.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ko.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_pt_BR.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_zh_CN.properties | 6 +++--- .../tribes/group/interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- java/org/apache/catalina/webresources/LocalStrings.properties | 4 ++-- java/org/apache/catalina/webresources/LocalStrings_fr.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_ja.properties| 2 +- java/org/apache/catalina/webresources/LocalStrings_ko.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_zh_CN.properties | 4 ++-- .../tomcat/util/http/fileupload/disk/DiskFileItemFactory.java | 2 +- test/org/apache/catalina/core/TestSwallowAbortedUploads.java| 2 +- test/org/apache/catalina/tribes/demos/ChannelCreator.java | 2 +- test/org/apache/tomcat/util/net/TestSsl.java| 4 ++-- webapps/docs/config/ajp.xml | 2 +- webapps/docs/config/cluster-interceptor.xml | 2 +- webapps/docs/config/systemprops.xml | 4 ++-- webapps/docs/security-howto.xml | 2 +- .../WEB-INF/classes/compressionFilters/CompressionFilter.java | 2 +- .../compressionFilters/CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml | 2 +- 29 files changed, 52 insertions(+), 52 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index a435252fb8..9202c0aa8b 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -208,13 +208,13 @@ public class Connector extends LifecycleMBeanBase { protected int maxParameterCount = 1000; /** - * Maximum size of a POST which will be automatically parsed by the container. 2MiB by default. + * Maximum size of a POST which will be automatically parsed by the container. 2 MiB by default. */ protected int maxPostSize = 2 * 1024 * 1024; /** - * Maximum size of a POST which will be saved by the container during authentication. 4KiB by default + * Maximum size of a POST which will be saved by the container during authentication. 4 KiB by default */ protected int maxSavePostSize = 4 * 1024; diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java index bad632dd36..d0c8f46fd0 100644 --- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java +++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java @@ -46,7 +46,7 @@ public class FileMessageFactory { /** * The number of bytes that we read from file */ -public static final int READ_SIZE = 1024 * 10; // 10KiB +public static final int READ_SIZE = 1024 * 10; // 10 KiB /** * The file that we are reading/writing diff --git a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties index a2187e2520..c3270357ac 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties +++ b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties @@ -92,11 +92,11 @@ throughputInterceptor.report=ThroughputInterceptor Report[\n\ \tSent:{1} MiB (total)\n\ \tSent:{2} MiB (application)\n\ \tTime:{3} seconds\n\ -\tTx Speed:{4} MiB/sec (total)\n\ -\tTx Speed:{5} MiB/sec (application)\n\ +\
[tomcat] branch 10.1.x updated: Fix formatting. There should be a space between number and unit.
This is an automated email from the ASF dual-hosted git repository. markt 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 7d3142ffe1 Fix formatting. There should be a space between number and unit. 7d3142ffe1 is described below commit 7d3142ffe19672234a72c1a6da105d79b2bfea0f Author: Mark Thomas AuthorDate: Mon Aug 21 16:12:18 2023 -0700 Fix formatting. There should be a space between number and unit. --- java/org/apache/catalina/connector/Connector.java | 4 ++-- java/org/apache/catalina/ha/deploy/FileMessageFactory.java | 2 +- .../catalina/tribes/group/interceptors/LocalStrings.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_cs.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_es.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_fr.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ja.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ko.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_pt_BR.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_zh_CN.properties | 6 +++--- .../tribes/group/interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- java/org/apache/catalina/webresources/LocalStrings.properties | 4 ++-- java/org/apache/catalina/webresources/LocalStrings_fr.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_ja.properties| 2 +- java/org/apache/catalina/webresources/LocalStrings_ko.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_zh_CN.properties | 4 ++-- .../tomcat/util/http/fileupload/disk/DiskFileItemFactory.java | 2 +- test/org/apache/catalina/core/TestSwallowAbortedUploads.java| 2 +- test/org/apache/catalina/tribes/demos/ChannelCreator.java | 2 +- test/org/apache/tomcat/util/net/TestSsl.java| 4 ++-- webapps/docs/config/ajp.xml | 2 +- webapps/docs/config/cluster-interceptor.xml | 2 +- webapps/docs/config/systemprops.xml | 4 ++-- webapps/docs/security-howto.xml | 2 +- .../WEB-INF/classes/compressionFilters/CompressionFilter.java | 2 +- .../compressionFilters/CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml | 2 +- 29 files changed, 52 insertions(+), 52 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index 61c7f05a4e..a0c3b1bc56 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -209,13 +209,13 @@ public class Connector extends LifecycleMBeanBase { protected int maxParameterCount = 1; /** - * Maximum size of a POST which will be automatically parsed by the container. 2MiB by default. + * Maximum size of a POST which will be automatically parsed by the container. 2 MiB by default. */ protected int maxPostSize = 2 * 1024 * 1024; /** - * Maximum size of a POST which will be saved by the container during authentication. 4KiB by default + * Maximum size of a POST which will be saved by the container during authentication. 4 KiB by default */ protected int maxSavePostSize = 4 * 1024; diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java index 7ba575d5b3..9789a68ce0 100644 --- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java +++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java @@ -46,7 +46,7 @@ public class FileMessageFactory { /** * The number of bytes that we read from file */ -public static final int READ_SIZE = 1024 * 10; // 10KiB +public static final int READ_SIZE = 1024 * 10; // 10 KiB /** * The file that we are reading/writing diff --git a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties index a2187e2520..c3270357ac 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties +++ b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties @@ -92,11 +92,11 @@ throughputInterceptor.report=ThroughputInterceptor Report[\n\ \tSent:{1} MiB (total)\n\ \tSent:{2} MiB (application)\n\ \tTime:{3} seconds\n\ -\tTx Speed:{4} MiB/sec (total)\n\ -\tTx Speed:{5} MiB/sec (application)\
[tomcat] branch 9.0.x updated: Fix formatting. There should be a space between number and unit.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new a8abbac7a0 Fix formatting. There should be a space between number and unit. a8abbac7a0 is described below commit a8abbac7a01944a1cb3f83056029c67f9248b27f Author: Mark Thomas AuthorDate: Mon Aug 21 16:12:18 2023 -0700 Fix formatting. There should be a space between number and unit. --- java/org/apache/catalina/connector/Connector.java | 4 ++-- java/org/apache/catalina/ha/deploy/FileMessageFactory.java | 2 +- .../catalina/tribes/group/interceptors/LocalStrings.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_cs.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_es.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_fr.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ja.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ko.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_pt_BR.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_zh_CN.properties | 6 +++--- .../tribes/group/interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- java/org/apache/catalina/webresources/LocalStrings.properties | 4 ++-- java/org/apache/catalina/webresources/LocalStrings_fr.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_ja.properties| 2 +- java/org/apache/catalina/webresources/LocalStrings_ko.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_zh_CN.properties | 4 ++-- .../tomcat/util/http/fileupload/disk/DiskFileItemFactory.java | 2 +- test/org/apache/catalina/core/TestSwallowAbortedUploads.java| 2 +- test/org/apache/catalina/tribes/demos/ChannelCreator.java | 2 +- test/org/apache/tomcat/util/net/TestSsl.java| 4 ++-- webapps/docs/config/ajp.xml | 2 +- webapps/docs/config/cluster-interceptor.xml | 2 +- webapps/docs/config/systemprops.xml | 2 +- webapps/docs/security-howto.xml | 2 +- .../WEB-INF/classes/compressionFilters/CompressionFilter.java | 2 +- .../compressionFilters/CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml | 2 +- 29 files changed, 51 insertions(+), 51 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index fad5e558ea..4266f75fda 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -201,13 +201,13 @@ public class Connector extends LifecycleMBeanBase { protected int maxParameterCount = 1; /** - * Maximum size of a POST which will be automatically parsed by the container. 2MiB by default. + * Maximum size of a POST which will be automatically parsed by the container. 2 MiB by default. */ protected int maxPostSize = 2 * 1024 * 1024; /** - * Maximum size of a POST which will be saved by the container during authentication. 4KiB by default + * Maximum size of a POST which will be saved by the container during authentication. 4 KiB by default */ protected int maxSavePostSize = 4 * 1024; diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java index 831aaa81bd..90207199cb 100644 --- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java +++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java @@ -46,7 +46,7 @@ public class FileMessageFactory { /** * The number of bytes that we read from file */ -public static final int READ_SIZE = 1024 * 10; // 10KiB +public static final int READ_SIZE = 1024 * 10; // 10 KiB /** * The file that we are reading/writing diff --git a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties index a2187e2520..c3270357ac 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties +++ b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties @@ -92,11 +92,11 @@ throughputInterceptor.report=ThroughputInterceptor Report[\n\ \tSent:{1} MiB (total)\n\ \tSent:{2} MiB (application)\n\ \tTime:{3} seconds\n\ -\tTx Speed:{4} MiB/sec (total)\n\ -\tTx Speed:{5} MiB/sec (application)\n\ +
[tomcat] branch 8.5.x updated: Fix formatting. There should be a space between number and unit.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 3fcfacc9a7 Fix formatting. There should be a space between number and unit. 3fcfacc9a7 is described below commit 3fcfacc9a74aa88f41bc1f864359539728bbf23e Author: Mark Thomas AuthorDate: Mon Aug 21 16:12:18 2023 -0700 Fix formatting. There should be a space between number and unit. --- java/org/apache/catalina/connector/Connector.java | 4 ++-- java/org/apache/catalina/ha/deploy/FileMessageFactory.java | 2 +- .../catalina/tribes/group/interceptors/LocalStrings.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_es.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_fr.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ja.properties | 6 +++--- .../catalina/tribes/group/interceptors/LocalStrings_ko.properties | 6 +++--- .../tribes/group/interceptors/LocalStrings_zh_CN.properties | 6 +++--- .../tribes/group/interceptors/MessageDispatchInterceptor.java | 2 +- java/org/apache/catalina/tribes/io/BufferPool.java | 2 +- java/org/apache/catalina/util/IOTools.java | 2 +- java/org/apache/catalina/webresources/LocalStrings.properties | 4 ++-- java/org/apache/catalina/webresources/LocalStrings_fr.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_ja.properties| 2 +- java/org/apache/catalina/webresources/LocalStrings_ko.properties| 4 ++-- java/org/apache/catalina/webresources/LocalStrings_zh_CN.properties | 4 ++-- .../tomcat/util/http/fileupload/disk/DiskFileItemFactory.java | 2 +- test/org/apache/catalina/core/TestSwallowAbortedUploads.java| 2 +- test/org/apache/catalina/tribes/demos/ChannelCreator.java | 2 +- test/org/apache/tomcat/util/net/TestSsl.java| 4 ++-- webapps/docs/config/ajp.xml | 2 +- webapps/docs/config/cluster-interceptor.xml | 2 +- webapps/docs/config/systemprops.xml | 2 +- webapps/docs/security-howto.xml | 2 +- .../WEB-INF/classes/compressionFilters/CompressionFilter.java | 2 +- .../compressionFilters/CompressionServletResponseWrapper.java | 2 +- webapps/manager/WEB-INF/web.xml | 2 +- 27 files changed, 45 insertions(+), 45 deletions(-) diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java index 1f089ea47a..e102bac5bb 100644 --- a/java/org/apache/catalina/connector/Connector.java +++ b/java/org/apache/catalina/connector/Connector.java @@ -203,13 +203,13 @@ public class Connector extends LifecycleMBeanBase { protected int maxParameterCount = 1; /** - * Maximum size of a POST which will be automatically parsed by the container. 2MiB by default. + * Maximum size of a POST which will be automatically parsed by the container. 2 MiB by default. */ protected int maxPostSize = 2 * 1024 * 1024; /** - * Maximum size of a POST which will be saved by the container during authentication. 4KiB by default + * Maximum size of a POST which will be saved by the container during authentication. 4 KiB by default */ protected int maxSavePostSize = 4 * 1024; diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java index 831aaa81bd..90207199cb 100644 --- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java +++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java @@ -46,7 +46,7 @@ public class FileMessageFactory { /** * The number of bytes that we read from file */ -public static final int READ_SIZE = 1024 * 10; // 10KiB +public static final int READ_SIZE = 1024 * 10; // 10 KiB /** * The file that we are reading/writing diff --git a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties index 0ed9a6fe89..35c2f6c2c4 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties +++ b/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties @@ -71,11 +71,11 @@ throughputInterceptor.report=ThroughputInterceptor Report[\n\ \tSent:{1} MiB (total)\n\ \tSent:{2} MiB (application)\n\ \tTime:{3} seconds\n\ -\tTx Speed:{4} MiB/sec (total)\n\ -\tTx Speed:{5} MiB/sec (application)\n\ +\tTx Speed:{4} MiB/s (total)\n\ +\tTx Speed:{5} MiB/s (application)\n\ \tError Msg:{6}\n\ \tRx Msg:{7} messages\n\ -\tRx Speed:{8} MiB/sec (since 1st msg)\n\
[GitHub] [tomcat] sergmain opened a new pull request, #647: Replaced synchronized with StampedLock
sergmain opened a new pull request, #647: URL: https://github.com/apache/tomcat/pull/647 Replaced synchronized with StampedLock as preparation for virtual threads -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat-jakartaee-migration] tutufool commented on issue #47: EE package migration
tutufool commented on issue #47: URL: https://github.com/apache/tomcat-jakartaee-migration/issues/47#issuecomment-1687326690 cool, thanks a lot! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] michael-o commented on a diff in pull request #646: Parameter error handling
michael-o commented on code in PR #646: URL: https://github.com/apache/tomcat/pull/646#discussion_r1301062237 ## java/org/apache/tomcat/util/http/InvalidParameterException.java: ## @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.http; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * Extend {@link IllegalStateException} to identify the cause as an invalid parameter. + * + * Implementation note: This class extends {@link IllegalStateException} since that is the class that the Servlet 6.1 + * onwards Javadocs define is thrown by the various {@code ServletRequest.getParameterXXX()} methods. + */ +public class InvalidParameterException extends IllegalStateException { + +private static final long serialVersionUID = 1L; + +private final int errorCode; + + +/** + * Construct a new exception with the given message. + * + * @param message The message to use for the exception + */ +public InvalidParameterException(String message) { +this(message, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given message and error code. + * + * @param message The message to use for the exception + * @param errorCode The HTTP status code to use when reporting this error. Expected to be >= 400. + */ +public InvalidParameterException(String message, int errorCode) { +this(message, null, errorCode); +} + + +/** + * Construct a new exception with the given message and cause. + * + * @param message The message to use for the exception + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(String message, Throwable cause) { +this(message, cause, HttpServletResponse.SC_BAD_REQUEST); +} + + +/** + * Construct a new exception with the given cause. The message for this exception will be generated by calling + * {@code cause.toString()}. + * + * @param cause The exception to use as the cause of this exception + */ +public InvalidParameterException(Throwable cause) { +this(cause.toString(), cause, HttpServletResponse.SC_BAD_REQUEST); Review Comment: Accepted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org