(tomcat) 01/05: Fix BZ 68884 - improve handling of large scale WebSocket disconnects
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 commit a37a6d312c4bfa7e46e08266505b3c26413ec2a2 Author: Mark Thomas AuthorDate: Thu May 2 15:13:53 2024 +0100 Fix BZ 68884 - improve handling of large scale WebSocket disconnects --- java/org/apache/tomcat/websocket/Constants.java| 5 + .../tomcat/websocket/WsRemoteEndpointImplBase.java | 23 +- java/org/apache/tomcat/websocket/WsSession.java| 23 +- webapps/docs/changelog.xml | 12 +++ webapps/docs/web-socket-howto.xml | 14 +++-- 5 files changed, 65 insertions(+), 12 deletions(-) diff --git a/java/org/apache/tomcat/websocket/Constants.java b/java/org/apache/tomcat/websocket/Constants.java index d03e21abc8..3ea477b26e 100644 --- a/java/org/apache/tomcat/websocket/Constants.java +++ b/java/org/apache/tomcat/websocket/Constants.java @@ -113,6 +113,11 @@ public class Constants { // Default is 30 seconds - setting is in milliseconds public static final long DEFAULT_SESSION_CLOSE_TIMEOUT = TimeUnit.SECONDS.toMillis(30); +// Configuration for session close timeout +public static final String ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT_PROPERTY = "org.apache.tomcat.websocket.ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT"; +// Default is 50 milliseconds - setting is in milliseconds +public static final long DEFAULT_ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT = 50; + // Configuration for read idle timeout on WebSocket session public static final String READ_IDLE_TIMEOUT_MS = "org.apache.tomcat.websocket.READ_IDLE_TIMEOUT_MS"; diff --git a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java index 9008db20d6..f366ae20c5 100644 --- a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java +++ b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java @@ -236,7 +236,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { void sendMessageBlock(CharBuffer part, boolean last) throws IOException { -long timeoutExpiry = getTimeoutExpiry(); +long timeout = getBlockingSendTimeout(); boolean isDone = false; while (!isDone) { encoderBuffer.clear(); @@ -246,22 +246,27 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { } isDone = !cr.isOverflow(); encoderBuffer.flip(); -sendMessageBlock(Constants.OPCODE_TEXT, encoderBuffer, last && isDone, timeoutExpiry); +sendMessageBlock(Constants.OPCODE_TEXT, encoderBuffer, last && isDone, timeout); } stateMachine.complete(last); } void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last) throws IOException { -sendMessageBlock(opCode, payload, last, getTimeoutExpiry()); +sendMessageBlock(opCode, payload, last, getBlockingSendTimeout()); } -private long getTimeoutExpiry() { -// Get the timeout before we send the message. The message may -// trigger a session close and depending on timing the client -// session may close before we can read the timeout. -long timeout = getBlockingSendTimeout(); +void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last, long timeout) throws IOException { +/* + * Get the timeout before we send the message. The message may trigger a session close and depending on timing + * the client session may close before we can read the timeout. + */ +sendMessageBlockInternal(opCode, payload, last, getTimeoutExpiry(timeout)); +} + + +private long getTimeoutExpiry(long timeout) { if (timeout < 0) { return Long.MAX_VALUE; } else { @@ -270,7 +275,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { } -private void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last, long timeoutExpiry) +private void sendMessageBlockInternal(byte opCode, ByteBuffer payload, boolean last, long timeoutExpiry) throws IOException { wsSession.updateLastActiveWrite(); diff --git a/java/org/apache/tomcat/websocket/WsSession.java b/java/org/apache/tomcat/websocket/WsSession.java index e71b719e27..8892e7d960 100644 --- a/java/org/apache/tomcat/websocket/WsSession.java +++ b/java/org/apache/tomcat/websocket/WsSession.java @@ -771,6 +771,22 @@ public class WsSession implements Session { } +/* + * Returns the session close timeout in milliseconds + */ +private long getAbnormalSessionCloseSendTimeout() { +long result = 0; +Object obj = userProperties.get(Constants.ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT_PROPERTY); +if (obj in
(tomcat) branch 9.0.x updated (5cb9912e1a -> 258cf33de7)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 5cb9912e1a Javadoc cleanup for Coyote new a37a6d312c Fix BZ 68884 - improve handling of large scale WebSocket disconnects new f2274d369d Fix ordering new d3ec5e7a65 Fix encoding new 0fca3b1ffe Remove unused entries new 258cf33de7 Improvements to Japanese translations by tak7iji. The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../catalina/core/LocalStrings_fr.properties | 1 - .../catalina/core/LocalStrings_ja.properties | 1 - .../catalina/security/LocalStrings.properties | 6 +++--- .../catalina/security/LocalStrings_ja.properties | 3 +++ .../apache/coyote/http2/LocalStrings_ja.properties | 2 +- .../util/http/parser/LocalStrings_fr.properties| 2 +- .../util/http/parser/LocalStrings_ja.properties| 2 +- .../tomcat/util/net/LocalStrings_fr.properties | 1 - .../tomcat/util/net/LocalStrings_ja.properties | 1 - java/org/apache/tomcat/websocket/Constants.java| 5 + .../tomcat/websocket/WsRemoteEndpointImplBase.java | 23 +- java/org/apache/tomcat/websocket/WsSession.java| 23 +- webapps/docs/changelog.xml | 15 ++ webapps/docs/web-socket-howto.xml | 14 +++-- 14 files changed, 77 insertions(+), 22 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 05/05: Improvements to Japanese translations by tak7iji.
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 commit 258cf33de76792a179741d3f2e0edbafc2ee6ee4 Author: Mark Thomas AuthorDate: Thu May 2 18:49:01 2024 +0100 Improvements to Japanese translations by tak7iji. --- java/org/apache/catalina/security/LocalStrings_ja.properties | 3 +++ java/org/apache/coyote/http2/LocalStrings_ja.properties| 2 +- java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties | 2 +- webapps/docs/changelog.xml | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/security/LocalStrings_ja.properties b/java/org/apache/catalina/security/LocalStrings_ja.properties index 33ff55df49..2fc4b12d41 100644 --- a/java/org/apache/catalina/security/LocalStrings_ja.properties +++ b/java/org/apache/catalina/security/LocalStrings_ja.properties @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +SecurityListener.buildDateAgeUnreadable=設定された buildDateWarningAgeDays の値 [{0}] を読み取ることができません。デフォルトの [{1}] 日を使用します。 +SecurityListener.buildDateIsOld=このバージョンの Tomcat は {0} 日以上前にビルドされました。 現在のバージョンにアップグレードすることを検討してください。 +SecurityListener.buildDateUnreadable=サーバーのビルド日 [{0}] は ISO 8601 形式の日付として読み取ることができません。 SecurityListener.checkUmaskFail=[{0}] のumask設定で開始しようとしました。 少なくとも [{1}] と同じようにumaskを指定しないでTomcatを実行すると、ライフサイクルリスナーのorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf/server.xmlで構成されています)によってブロックされます SecurityListener.checkUmaskNone=システムプロパティ [{0}] にumask設定が見つかりませんでした。しかし、Tomcatはumaskをサポートするプラットフォームで動作しているようです。システムプロパティは通常、CATALINA_HOME/bin/catalina.shに設定されます。ライフサイクルリスナーのorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf/server.xmlに設定されています)では、少なくとも [{1}] と同じくらい拘束されたumaskが必要です。 SecurityListener.checkUmaskParseFail=値[{0}]を有効なumaskとして解析できませんでした。 diff --git a/java/org/apache/coyote/http2/LocalStrings_ja.properties b/java/org/apache/coyote/http2/LocalStrings_ja.properties index fa98e53e8d..7a383a9e35 100644 --- a/java/org/apache/coyote/http2/LocalStrings_ja.properties +++ b/java/org/apache/coyote/http2/LocalStrings_ja.properties @@ -130,7 +130,7 @@ upgradeHandler.allocate.left=コネクション [{0}]、ストリーム [{1}]、 upgradeHandler.connectionError=接続エラー upgradeHandler.enableRfc7450Priorities=接続 [{0}] は、RFC 7450 優先順位が初期接続設定フレームで無効にされた後に有効にならない場合があります (RFC 9218 を参照) upgradeHandler.fallToDebug=\n\ -\ 注: HTTP/2 ストリームのエラーがさらに発生すると、DEBUG レベルでログに記録されます。 +\ 注: 以降のHTTP/2 ストリームエラーの発生はDEBUGレベルでログに出力されます。 upgradeHandler.goaway.debug=コネクション [{0}]、Goaway、最終ストリーム [{1}]、エラーコード [{2}]、デバッグデータ [{3}] upgradeHandler.init=コネクション[{0}]、状態[{1}] upgradeHandler.invalidPreface=コネクション[{0}]、無効なConnection Preface diff --git a/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties b/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties index abde689744..a95ae9dc20 100644 --- a/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties +++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties @@ -45,7 +45,7 @@ http.tooManyColons=IPv6 アドレスでは文字 : を 2 つ以上連続する http.tooManyDoubleColons=IPv6アドレスは単一の '::'シーケンスのみを含むことができます。 http.tooManyHextets=IPv6 アドレスは [{0}] ヘクステットで構成されていますが、正常な IPv6 アドレスなら 8 ヘクステット以上になりません。 -httpHeaderParser.invalidHeader=HTTP ヘッダーの [{0}] 行目は RFC 7230 に準拠していません。リクエストは拒否されました。 +httpHeaderParser.invalidHeader=HTTP ヘッダーの [{0}] 行目は RFC 9112 に準拠していません。リクエストは拒否されました。 sf.bareitem.invalidCharacter=ベアアイテムの開始を解析中に無効な文字 [{0}] が見つかりました sf.base64.invalidCharacter=文字 [{0}] は base64 シーケンス内では無効です diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 132a9a517c..4c3feb27dc 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -251,6 +251,9 @@ Update the internal fork of Apache Commons DBCP to 2.12.0. (markt) + +Improvements to Japanese translations by tak7iji. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 04/05: Remove unused entries
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 commit 0fca3b1ffe52719e95493d73d896f9efacaae03c Author: Mark Thomas AuthorDate: Thu May 2 18:47:30 2024 +0100 Remove unused entries --- java/org/apache/catalina/core/LocalStrings_fr.properties | 1 - java/org/apache/catalina/core/LocalStrings_ja.properties | 1 - java/org/apache/tomcat/util/net/LocalStrings_fr.properties | 1 - java/org/apache/tomcat/util/net/LocalStrings_ja.properties | 1 - 4 files changed, 4 deletions(-) diff --git a/java/org/apache/catalina/core/LocalStrings_fr.properties b/java/org/apache/catalina/core/LocalStrings_fr.properties index 22b2082f46..1220749471 100644 --- a/java/org/apache/catalina/core/LocalStrings_fr.properties +++ b/java/org/apache/catalina/core/LocalStrings_fr.properties @@ -42,7 +42,6 @@ applicationContext.setSessionTracking.iae.ssl=Les modes de suivi de session pour applicationContext.setSessionTracking.ise=Les modes de suivi de session ("session tracking") du contexte [{0}] ne peuvent être définis pendant que le contexte est en cours d''exécution applicationDispatcher.allocateException=Exception d''allocation pour la servlet [{0}] -applicationDispatcher.customResponse=La réponse de classe [{0}] n''a pas permis d''obtenir la réponse de Catalina et sera fermée immédiatement après le forward applicationDispatcher.deallocateException=Exception de désallocation pour la servlet [{0}] applicationDispatcher.forward.ise=Impossible d'utiliser faire-suivre (forward) après que la réponse ait été envoyée applicationDispatcher.isUnavailable=La servlet [{0}] est actuellement indisponible diff --git a/java/org/apache/catalina/core/LocalStrings_ja.properties b/java/org/apache/catalina/core/LocalStrings_ja.properties index c966e1f43f..f4037b7734 100644 --- a/java/org/apache/catalina/core/LocalStrings_ja.properties +++ b/java/org/apache/catalina/core/LocalStrings_ja.properties @@ -42,7 +42,6 @@ applicationContext.setSessionTracking.iae.ssl=コンテキスト [{0}] に対し applicationContext.setSessionTracking.ise=コンテキスト [{0}] は実行中のためセッション追跡モードを構成できません。 applicationDispatcher.allocateException=サーブレット [{0}] に例外を割り当てます -applicationDispatcher.customResponse=レスポンスクラス [{0}] は Catalina レスポンスクラスにアンラップできませんでした。転送後すぐに閉じられます applicationDispatcher.deallocateException=サーブレット [{0}] の例外を解除します applicationDispatcher.forward.ise=レスポンスをコミットした後でフォワードできません applicationDispatcher.isUnavailable=サーブレット [{0}] は現在利用できません diff --git a/java/org/apache/tomcat/util/net/LocalStrings_fr.properties b/java/org/apache/tomcat/util/net/LocalStrings_fr.properties index cc95b59d83..b88a44ac1e 100644 --- a/java/org/apache/tomcat/util/net/LocalStrings_fr.properties +++ b/java/org/apache/tomcat/util/net/LocalStrings_fr.properties @@ -82,7 +82,6 @@ endpoint.err.close=Une exception s'est produite en essayant de fermer le socket endpoint.err.duplicateAccept=Le socket a été accpeté deux fois. Ceci est un bug connu du kernel Linux. La connection originelle a été traitée normalement et le doublon a été ignoré. Le client ne devrait pas être affecté. Mettre à jour l'OS vers une version qui utilise un kernel 5.10 ou plus récent devrait corriger le problème. endpoint.err.handshake=Echec de négociation endpoint.err.unexpected=Erreur inattendue lors du traitement du socket -endpoint.errorCreatingSSLContext=Erreur lors de la création du SSLContext endpoint.executor.fail=L''exécuteur a rejeté le traitement du socket [{0}] endpoint.getAttribute=[{0}] est [{1}] endpoint.init.bind=L''association du socket a échoué : [{0}] [{1}] diff --git a/java/org/apache/tomcat/util/net/LocalStrings_ja.properties b/java/org/apache/tomcat/util/net/LocalStrings_ja.properties index d8b58a1e55..7b155e09b4 100644 --- a/java/org/apache/tomcat/util/net/LocalStrings_ja.properties +++ b/java/org/apache/tomcat/util/net/LocalStrings_ja.properties @@ -82,7 +82,6 @@ endpoint.err.close=ソケットをクローズしようとした際に例外が endpoint.err.duplicateAccept=重複したソケット受け付けが検出されました。 これはLinuxカーネルの既知のバグです。 最初のコネクションは正常に処理され、重複受け付けは無視されました。 クライアントは影響を受けないはずです。Linuxカーネルをバージョン5.10以降に更新すると、重複受け付けのバグが修正されます。 endpoint.err.handshake=ハンドシェイク失敗 endpoint.err.unexpected=ソケット処理中の予期せぬエラー -endpoint.errorCreatingSSLContext=SSLContextの作成中にエラーが発生しました endpoint.executor.fail=エグゼキュータは処理するソケット [{0}] を拒否しました endpoint.getAttribute=[{0}] は [{1}] です endpoint.init.bind=ソケットバインドに失敗しました:[{0}] [{1}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 03/05: Fix encoding
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 commit d3ec5e7a65711c3b3bfa5c13731392dd5f5d4eb7 Author: Mark Thomas AuthorDate: Thu May 2 18:46:56 2024 +0100 Fix encoding --- java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties b/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties index a1be4a83bd..a4e90bd377 100644 --- a/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties +++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties @@ -45,7 +45,7 @@ http.tooManyColons=Une adresse IPv6 ne peut pas contenir plus de deux caractère http.tooManyDoubleColons=Une adresse IPv6 ne peut contenir qu'une seule séquence "::" http.tooManyHextets=L''adresse IPv6 contient [{0}] groupes de 4 octets mais une adresse IPv6 valide ne doit pas en avoir plus de 8 -httpHeaderParser.invalidHeader=La ligne d''en-t�te HTTP [{0}] ne respecte pas la RFC 7230. La requ�te a �t� rejet�e. +httpHeaderParser.invalidHeader=La ligne d''en-tête HTTP [{0}] ne respecte pas la RFC 9112. La requête a été rejetée. sf.bareitem.invalidCharacter=Le caractère [{0}] invalide a été rencontré en début d''un objet sf.base64.invalidCharacter=Le caractère [{0}] est invalide dans une séquence base64 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/05: Fix ordering
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 commit f2274d369d46bdda03501e0893b0522b1a0035da Author: Mark Thomas AuthorDate: Thu May 2 18:44:50 2024 +0100 Fix ordering --- java/org/apache/catalina/security/LocalStrings.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/security/LocalStrings.properties b/java/org/apache/catalina/security/LocalStrings.properties index e356c44a27..f16560004f 100644 --- a/java/org/apache/catalina/security/LocalStrings.properties +++ b/java/org/apache/catalina/security/LocalStrings.properties @@ -13,14 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +SecurityListener.buildDateAgeUnreadable=Unable to read configured buildDateWarningAgeDays [{0}], using default of [{1}] days. +SecurityListener.buildDateIsOld=This version of Tomcat was built more than {0} days ago. You should consider upgrading to the current version. +SecurityListener.buildDateUnreadable=Server build date [{0}] is unreadable as an ISO-8601 date. SecurityListener.checkUmaskFail=Start attempted with umask setting of [{0}]. Running Tomcat without a umask at least as restrictive as [{1}] has been blocked by the Lifecycle listener org.apache.catalina.security.SecurityListener (usually configured in CATALINA_BASE/conf/server.xml) SecurityListener.checkUmaskNone=No umask setting was found in system property [{0}]. However, it appears Tomcat is running on a platform that supports umask. The system property is typically set in CATALINA_HOME/bin/catalina.sh. The Lifecycle listener org.apache.catalina.security.SecurityListener (usually configured in CATALINA_BASE/conf/server.xml) expects a umask at least as restrictive as [{1}] SecurityListener.checkUmaskParseFail=Failed to parse value [{0}] as a valid umask. SecurityListener.checkUmaskSkip=Unable to determine umask. It appears Tomcat is running on Windows so skip the umask check. SecurityListener.checkUserWarning=Start attempted while running as user [{0}]. Running Tomcat as this user has been blocked by the Lifecycle listener org.apache.catalina.security.SecurityListener (usually configured in CATALINA_BASE/conf/server.xml) -SecurityListener.buildDateAgeUnreadable=Unable to read configured buildDateWarningAgeDays [{0}], using default of [{1}] days. -SecurityListener.buildDateUnreadable=Server build date [{0}] is unreadable as an ISO-8601 date. -SecurityListener.buildDateIsOld=This version of Tomcat was built more than {0} days ago. You should consider upgrading to the current version. SecurityUtil.doAsPrivilege=An exception occurs when running the PrivilegedExceptionAction block. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 05/05: Improvements to Japanese translations by tak7iji. (markt)
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 commit fea6de2b7fdfdeec33073f7035ed3c341e5f70f6 Author: Mark Thomas AuthorDate: Thu May 2 18:36:48 2024 +0100 Improvements to Japanese translations by tak7iji. (markt) --- java/org/apache/catalina/core/LocalStrings_ja.properties | 5 + java/org/apache/catalina/security/LocalStrings_ja.properties | 3 +++ java/org/apache/coyote/http2/LocalStrings_ja.properties | 2 +- java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties | 2 +- .../apache/tomcat/util/net/openssl/panama/LocalStrings_ja.properties | 2 ++ webapps/docs/changelog.xml | 3 +++ 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/core/LocalStrings_ja.properties b/java/org/apache/catalina/core/LocalStrings_ja.properties index 714d5f408c..bc495f6687 100644 --- a/java/org/apache/catalina/core/LocalStrings_ja.properties +++ b/java/org/apache/catalina/core/LocalStrings_ja.properties @@ -173,6 +173,11 @@ naming.wsdlFailed=wsdl ファイル [{0}] が見つかりませんでした。 noPluggabilityServletContext.notAllowed=Servlet 3.0仕様の4.4節では、web.xmlに定義されていないServletContextListener、web-fragment.xmlファイル、@WebListenerアノテーションからこのメソッドを呼び出すことはできません。 +openssllistener.destroy=OpenSSL のシャットダウンに失敗しました +openssllistener.initializeFIPSFailed=FIPS モードに入るのに失敗しました +openssllistener.java22=Tomcat OpenSSL サポートには、Java 22 以降で利用可能な FFM API が必要です。代わりに tomcat ネイティブを使用する必要があります +openssllistener.sslInit=SSLEngineの初期化に失敗しました。 + propertiesRoleMappingListener.linkedRole=アプリケーション ロール [{0}] を技術ロール [{1}] にリンクしました propertiesRoleMappingListener.linkedRoleCount=アプリケーション ロール [{0}] を技術ロールにリンクしました propertiesRoleMappingListener.roleMappingFileEmpty=ロール マッピング ファイルを空にすることはできません diff --git a/java/org/apache/catalina/security/LocalStrings_ja.properties b/java/org/apache/catalina/security/LocalStrings_ja.properties index 33ff55df49..2fc4b12d41 100644 --- a/java/org/apache/catalina/security/LocalStrings_ja.properties +++ b/java/org/apache/catalina/security/LocalStrings_ja.properties @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +SecurityListener.buildDateAgeUnreadable=設定された buildDateWarningAgeDays の値 [{0}] を読み取ることができません。デフォルトの [{1}] 日を使用します。 +SecurityListener.buildDateIsOld=このバージョンの Tomcat は {0} 日以上前にビルドされました。 現在のバージョンにアップグレードすることを検討してください。 +SecurityListener.buildDateUnreadable=サーバーのビルド日 [{0}] は ISO 8601 形式の日付として読み取ることができません。 SecurityListener.checkUmaskFail=[{0}] のumask設定で開始しようとしました。 少なくとも [{1}] と同じようにumaskを指定しないでTomcatを実行すると、ライフサイクルリスナーのorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf/server.xmlで構成されています)によってブロックされます SecurityListener.checkUmaskNone=システムプロパティ [{0}] にumask設定が見つかりませんでした。しかし、Tomcatはumaskをサポートするプラットフォームで動作しているようです。システムプロパティは通常、CATALINA_HOME/bin/catalina.shに設定されます。ライフサイクルリスナーのorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf/server.xmlに設定されています)では、少なくとも [{1}] と同じくらい拘束されたumaskが必要です。 SecurityListener.checkUmaskParseFail=値[{0}]を有効なumaskとして解析できませんでした。 diff --git a/java/org/apache/coyote/http2/LocalStrings_ja.properties b/java/org/apache/coyote/http2/LocalStrings_ja.properties index fa98e53e8d..7a383a9e35 100644 --- a/java/org/apache/coyote/http2/LocalStrings_ja.properties +++ b/java/org/apache/coyote/http2/LocalStrings_ja.properties @@ -130,7 +130,7 @@ upgradeHandler.allocate.left=コネクション [{0}]、ストリーム [{1}]、 upgradeHandler.connectionError=接続エラー upgradeHandler.enableRfc7450Priorities=接続 [{0}] は、RFC 7450 優先順位が初期接続設定フレームで無効にされた後に有効にならない場合があります (RFC 9218 を参照) upgradeHandler.fallToDebug=\n\ -\ 注: HTTP/2 ストリームのエラーがさらに発生すると、DEBUG レベルでログに記録されます。 +\ 注: 以降のHTTP/2 ストリームエラーの発生はDEBUGレベルでログに出力されます。 upgradeHandler.goaway.debug=コネクション [{0}]、Goaway、最終ストリーム [{1}]、エラーコード [{2}]、デバッグデータ [{3}] upgradeHandler.init=コネクション[{0}]、状態[{1}] upgradeHandler.invalidPreface=コネクション[{0}]、無効なConnection Preface diff --git a/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties b/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties index abde689744..a95ae9dc20 100644 --- a/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties +++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties @@ -45,7 +45,7 @@ http.tooManyColons=IPv6 アドレスでは文字 : を 2 つ以上連続する http.tooManyDoubleColons=IPv6アドレスは単一の '::'シーケンスのみを含むことができます。 http.tooManyHextets=IPv6 アドレスは [{0}] ヘクステットで構成されていますが、正常な IPv6 アドレスなら 8 ヘクステット以上になりません。 -httpHeaderParser.invalidHeader=HTTP ヘッダーの [{0}] 行目は RFC 7230 に準拠していません。リクエストは拒否されました。 +httpHeaderParser.invalidHeader=HTTP ヘッダーの [{0}] 行目は RFC 9112 に準拠していません。リクエストは拒否されました。 sf.bareitem.invalidCharacter=ベアアイテムの開始を解析中に無効な文字 [{0}] が見つかりました sf.base64.invalidCharacter=文字 [{0}] は base64 シーケンス内では無効です diff --git a/java/org/apache/tomcat/util/net/openssl/panama/LocalSt
(tomcat) 02/05: Fix encoding issues
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 commit 0bfe5212be0f3d8e25048f91f9f4e759ca3cdd92 Author: Mark Thomas AuthorDate: Thu May 2 18:33:52 2024 +0100 Fix encoding issues --- java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties b/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties index a1be4a83bd..a4e90bd377 100644 --- a/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties +++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties @@ -45,7 +45,7 @@ http.tooManyColons=Une adresse IPv6 ne peut pas contenir plus de deux caractère http.tooManyDoubleColons=Une adresse IPv6 ne peut contenir qu'une seule séquence "::" http.tooManyHextets=L''adresse IPv6 contient [{0}] groupes de 4 octets mais une adresse IPv6 valide ne doit pas en avoir plus de 8 -httpHeaderParser.invalidHeader=La ligne d''en-t�te HTTP [{0}] ne respecte pas la RFC 7230. La requ�te a �t� rejet�e. +httpHeaderParser.invalidHeader=La ligne d''en-tête HTTP [{0}] ne respecte pas la RFC 9112. La requête a été rejetée. sf.bareitem.invalidCharacter=Le caractère [{0}] invalide a été rencontré en début d''un objet sf.base64.invalidCharacter=Le caractère [{0}] est invalide dans une séquence base64 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 04/05: Improvements to French translations. (remm)
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 commit 77471b52e0caea003fc5dd717ca53d5a85ad5ade Author: Mark Thomas AuthorDate: Thu May 2 18:35:50 2024 +0100 Improvements to French translations. (remm) --- java/org/apache/catalina/core/LocalStrings_fr.properties | 5 + .../apache/tomcat/util/net/openssl/panama/LocalStrings_fr.properties | 2 ++ webapps/docs/changelog.xml | 3 +++ 3 files changed, 10 insertions(+) diff --git a/java/org/apache/catalina/core/LocalStrings_fr.properties b/java/org/apache/catalina/core/LocalStrings_fr.properties index 3a88c9aab9..804bc45e82 100644 --- a/java/org/apache/catalina/core/LocalStrings_fr.properties +++ b/java/org/apache/catalina/core/LocalStrings_fr.properties @@ -173,6 +173,11 @@ naming.wsdlFailed=fichier wsdl [{0}] non trouvé noPluggabilityServletContext.notAllowed=La section 4.4 de la spécification Servlet 3.0 ne permet pas à cette méthode d'être appelée à partir d'un ServletContextListener qui n'a pas été déclaré dans web.xml, un web-fragment.xml, ou annoté avec @WebListener +openssllistener.destroy=Erreur d'arrêt d'OpenSSL +openssllistener.initializeFIPSFailed=Echec d'entrée en mode FIPS +openssllistener.java22=Le support d'OpenSSL dans Tomcat nécessite l'API FFM qui est disponible dans Java 22 ou plus récent, Apache Tomcat Native devrait être utilisé à la place +openssllistener.sslInit=Erreur d'initialisation d'OpenSSL + propertiesRoleMappingListener.linkedRole=Le rôle de l''application [{0}] a été associé avec succès au rôle [{1}] propertiesRoleMappingListener.linkedRoleCount=[{0}] rôles de l''application ont été associés à des rôles propertiesRoleMappingListener.roleMappingFileEmpty=Le fichier d'association de rôles ne peut être vide diff --git a/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings_fr.properties b/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings_fr.properties index 3d40e40d20..8025c3bb57 100644 --- a/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings_fr.properties +++ b/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings_fr.properties @@ -33,6 +33,7 @@ engine.nullName=La valeur du nom est null engine.nullValue=La valeur est null engine.ocspParseError=Erreur de traitement des URLs OCSP engine.ocspRequestError=Erreur de traitement de la requête OCSP pour l''URL [{0}] +engine.ocspResponse=La réponse OCSP pour l''URL [{0}] était [{1}] engine.openSSLError=Erreur OpenSSL : [{0}] message : [{1}] engine.oversizedPacket=Le paquet crypté est trop gros engine.unsupportedCipher=Suite de chiffres non supportée : [{0}] [{1}] @@ -57,6 +58,7 @@ openssl.errorLoadingPassword=Erreur lors du chargment du fichier mot de passe: [ openssl.errorLoadingPrivateKey=Erreur lors du chargment de la clé privée: [{0}] openssl.errorPrivateKeyCheck=La clé privée ne correspond pas à la clé publique du certificat: [{0}] openssl.errorSSLCtxInit=Erreur d'initialisation du contexte SSL +openssl.invalidSslProtocol=La valeur invalide [{0}] a été fournie pour l''attribut SSLProtocol openssl.keyManagerMissing=Aucun gestionnaire de clés trouvé openssl.makeConf=Création du contexte de OpenSSLConf openssl.noCACerts=Aucun certificat CA n'a été configuré diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b5d35bd1e3..4b55664d87 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -242,6 +242,9 @@ Update the internal fork of Apache Commons DBCP to 2.12.0. (markt) + +Improvements to French translations. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 03/05: Remove unused translations
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 commit 3ffeb1ccf7e763e1ed3b9a528db33d16da187d1a Author: Mark Thomas AuthorDate: Thu May 2 18:35:07 2024 +0100 Remove unused translations --- java/org/apache/tomcat/util/net/LocalStrings_fr.properties | 1 - java/org/apache/tomcat/util/net/LocalStrings_ja.properties | 1 - 2 files changed, 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/LocalStrings_fr.properties b/java/org/apache/tomcat/util/net/LocalStrings_fr.properties index 037cdb5d6d..e357d83ee8 100644 --- a/java/org/apache/tomcat/util/net/LocalStrings_fr.properties +++ b/java/org/apache/tomcat/util/net/LocalStrings_fr.properties @@ -68,7 +68,6 @@ endpoint.err.close=Une exception s'est produite en essayant de fermer le socket endpoint.err.duplicateAccept=Le socket a été accpeté deux fois. Ceci est un bug connu du kernel Linux. La connection originelle a été traitée normalement et le doublon a été ignoré. Le client ne devrait pas être affecté. Mettre à jour l'OS vers une version qui utilise un kernel 5.10 ou plus récent devrait corriger le problème. endpoint.err.handshake=Echec de négociation endpoint.err.unexpected=Erreur inattendue lors du traitement du socket -endpoint.errorCreatingSSLContext=Erreur lors de la création du SSLContext endpoint.executor.fail=L''exécuteur a rejeté le traitement du socket [{0}] endpoint.getAttribute=[{0}] est [{1}] endpoint.init.bind=L''association du socket a échoué : [{0}] [{1}] diff --git a/java/org/apache/tomcat/util/net/LocalStrings_ja.properties b/java/org/apache/tomcat/util/net/LocalStrings_ja.properties index 5d6c9592a5..b629f867de 100644 --- a/java/org/apache/tomcat/util/net/LocalStrings_ja.properties +++ b/java/org/apache/tomcat/util/net/LocalStrings_ja.properties @@ -68,7 +68,6 @@ endpoint.err.close=ソケットをクローズしようとした際に例外が endpoint.err.duplicateAccept=重複したソケット受け付けが検出されました。 これはLinuxカーネルの既知のバグです。 最初のコネクションは正常に処理され、重複受け付けは無視されました。 クライアントは影響を受けないはずです。Linuxカーネルをバージョン5.10以降に更新すると、重複受け付けのバグが修正されます。 endpoint.err.handshake=ハンドシェイク失敗 endpoint.err.unexpected=ソケット処理中の予期せぬエラー -endpoint.errorCreatingSSLContext=SSLContextの作成中にエラーが発生しました endpoint.executor.fail=エグゼキュータは処理するソケット [{0}] を拒否しました endpoint.getAttribute=[{0}] は [{1}] です endpoint.init.bind=ソケットバインドに失敗しました:[{0}] [{1}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated (81a9391c33 -> fea6de2b7f)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 81a9391c33 Fix BZ 68884 - improve handling of large scale WebSocket disconnects new 804b6a7e19 Fix ordering new 0bfe5212be Fix encoding issues new 3ffeb1ccf7 Remove unused translations new 77471b52e0 Improvements to French translations. (remm) new fea6de2b7f Improvements to Japanese translations by tak7iji. (markt) The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/org/apache/catalina/core/LocalStrings_fr.properties| 5 + java/org/apache/catalina/core/LocalStrings_ja.properties| 5 + java/org/apache/catalina/security/LocalStrings.properties | 6 +++--- java/org/apache/catalina/security/LocalStrings_ja.properties| 3 +++ java/org/apache/coyote/http2/LocalStrings_ja.properties | 2 +- java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties | 2 +- java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties | 2 +- java/org/apache/tomcat/util/net/LocalStrings_fr.properties | 1 - java/org/apache/tomcat/util/net/LocalStrings_ja.properties | 1 - .../apache/tomcat/util/net/openssl/panama/LocalStrings.properties | 5 ++--- .../tomcat/util/net/openssl/panama/LocalStrings_fr.properties | 2 ++ .../tomcat/util/net/openssl/panama/LocalStrings_ja.properties | 2 ++ webapps/docs/changelog.xml | 6 ++ 13 files changed, 31 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/05: Fix ordering
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 commit 804b6a7e196136b43cadbf7a451f49f48a08d931 Author: Mark Thomas AuthorDate: Thu May 2 18:33:30 2024 +0100 Fix ordering --- java/org/apache/catalina/security/LocalStrings.properties | 6 +++--- .../apache/tomcat/util/net/openssl/panama/LocalStrings.properties | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/security/LocalStrings.properties b/java/org/apache/catalina/security/LocalStrings.properties index e356c44a27..f16560004f 100644 --- a/java/org/apache/catalina/security/LocalStrings.properties +++ b/java/org/apache/catalina/security/LocalStrings.properties @@ -13,14 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +SecurityListener.buildDateAgeUnreadable=Unable to read configured buildDateWarningAgeDays [{0}], using default of [{1}] days. +SecurityListener.buildDateIsOld=This version of Tomcat was built more than {0} days ago. You should consider upgrading to the current version. +SecurityListener.buildDateUnreadable=Server build date [{0}] is unreadable as an ISO-8601 date. SecurityListener.checkUmaskFail=Start attempted with umask setting of [{0}]. Running Tomcat without a umask at least as restrictive as [{1}] has been blocked by the Lifecycle listener org.apache.catalina.security.SecurityListener (usually configured in CATALINA_BASE/conf/server.xml) SecurityListener.checkUmaskNone=No umask setting was found in system property [{0}]. However, it appears Tomcat is running on a platform that supports umask. The system property is typically set in CATALINA_HOME/bin/catalina.sh. The Lifecycle listener org.apache.catalina.security.SecurityListener (usually configured in CATALINA_BASE/conf/server.xml) expects a umask at least as restrictive as [{1}] SecurityListener.checkUmaskParseFail=Failed to parse value [{0}] as a valid umask. SecurityListener.checkUmaskSkip=Unable to determine umask. It appears Tomcat is running on Windows so skip the umask check. SecurityListener.checkUserWarning=Start attempted while running as user [{0}]. Running Tomcat as this user has been blocked by the Lifecycle listener org.apache.catalina.security.SecurityListener (usually configured in CATALINA_BASE/conf/server.xml) -SecurityListener.buildDateAgeUnreadable=Unable to read configured buildDateWarningAgeDays [{0}], using default of [{1}] days. -SecurityListener.buildDateUnreadable=Server build date [{0}] is unreadable as an ISO-8601 date. -SecurityListener.buildDateIsOld=This version of Tomcat was built more than {0} days ago. You should consider upgrading to the current version. SecurityUtil.doAsPrivilege=An exception occurs when running the PrivilegedExceptionAction block. diff --git a/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings.properties b/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings.properties index 5b4ef5c6ee..1a2f3d83fa 100644 --- a/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings.properties +++ b/java/org/apache/tomcat/util/net/openssl/panama/LocalStrings.properties @@ -52,10 +52,10 @@ openssl.errMakeConf=Could not create OpenSSLConf context [{0}] openssl.errorAddingCertificate=Error adding certificate to chain: [{0}] openssl.errorConfiguringLocations=Error configuring CA certificate locations: [{0}] openssl.errorLoadingCertificate=Error loading certificate: [{0}] +openssl.errorLoadingCertificateRevocationListWithError=Error loading certificate revocation [{0}] with error [{1}] openssl.errorLoadingCertificateWithError=Error loading certificate [{0}] with error [{1}] openssl.errorLoadingPassword=Error loading password file: [{0}] openssl.errorLoadingPrivateKey=Error loading private key: [{0}] -openssl.errorLoadingCertificateRevocationListWithError=Error loading certificate revocation [{0}] with error [{1}] openssl.errorPrivateKeyCheck=Private key does not match the certificate public key: [{0}] openssl.errorSSLCtxInit=Error initializing SSL context openssl.invalidSslProtocol=An invalid value [{0}] was provided for the SSLProtocol attribute @@ -82,8 +82,6 @@ opensslconf.noCommandName=OpenSSLConf no command name - will be ignored (command opensslconf.resultCommand=OpenSSLConf command (name [{0}], value [{1}]) returned [{2}] opensslconf.unknownCommandType=SSL_CONF command [{0}] type unknown -sessionContext.nullTicketKeys=Null keys - openssllibrary.ciphersFailure=Failed getting cipher list openssllibrary.currentFIPSMode=Current FIPS mode: [{0}] openssllibrary.engineError=Error creating engine @@ -99,3 +97,4 @@ openssllibrary.tooLateForSSLEngine=Cannot setSSLEngine: SSL has already been ini openssllibrary.tooLateForSSLRandomSeed=Cannot setSSLRandomSeed: SSL has already been initialized openssllibrary.wrongFIPSMode=Unexp
(tomcat) branch 10.1.x updated: Fix BZ 68884 - improve handling of large scale WebSocket disconnects
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 81a9391c33 Fix BZ 68884 - improve handling of large scale WebSocket disconnects 81a9391c33 is described below commit 81a9391c33a241743c2632f0ded056dfff6d2cdf Author: Mark Thomas AuthorDate: Thu May 2 15:13:53 2024 +0100 Fix BZ 68884 - improve handling of large scale WebSocket disconnects --- java/org/apache/tomcat/websocket/Constants.java| 5 + .../tomcat/websocket/WsRemoteEndpointImplBase.java | 23 +- java/org/apache/tomcat/websocket/WsSession.java| 23 +- webapps/docs/changelog.xml | 12 +++ webapps/docs/web-socket-howto.xml | 14 +++-- 5 files changed, 65 insertions(+), 12 deletions(-) diff --git a/java/org/apache/tomcat/websocket/Constants.java b/java/org/apache/tomcat/websocket/Constants.java index 16f3f8184f..e394578c51 100644 --- a/java/org/apache/tomcat/websocket/Constants.java +++ b/java/org/apache/tomcat/websocket/Constants.java @@ -123,6 +123,11 @@ public class Constants { // Default is 30 seconds - setting is in milliseconds public static final long DEFAULT_SESSION_CLOSE_TIMEOUT = TimeUnit.SECONDS.toMillis(30); +// Configuration for session close timeout +public static final String ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT_PROPERTY = "org.apache.tomcat.websocket.ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT"; +// Default is 50 milliseconds - setting is in milliseconds +public static final long DEFAULT_ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT = 50; + // Configuration for read idle timeout on WebSocket session public static final String READ_IDLE_TIMEOUT_MS = "org.apache.tomcat.websocket.READ_IDLE_TIMEOUT_MS"; diff --git a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java index 7c28b06901..c36b3051a5 100644 --- a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java +++ b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java @@ -237,7 +237,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { void sendMessageBlock(CharBuffer part, boolean last) throws IOException { -long timeoutExpiry = getTimeoutExpiry(); +long timeout = getBlockingSendTimeout(); boolean isDone = false; while (!isDone) { encoderBuffer.clear(); @@ -247,22 +247,27 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { } isDone = !cr.isOverflow(); encoderBuffer.flip(); -sendMessageBlock(Constants.OPCODE_TEXT, encoderBuffer, last && isDone, timeoutExpiry); +sendMessageBlock(Constants.OPCODE_TEXT, encoderBuffer, last && isDone, timeout); } stateMachine.complete(last); } void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last) throws IOException { -sendMessageBlock(opCode, payload, last, getTimeoutExpiry()); +sendMessageBlock(opCode, payload, last, getBlockingSendTimeout()); } -private long getTimeoutExpiry() { -// Get the timeout before we send the message. The message may -// trigger a session close and depending on timing the client -// session may close before we can read the timeout. -long timeout = getBlockingSendTimeout(); +void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last, long timeout) throws IOException { +/* + * Get the timeout before we send the message. The message may trigger a session close and depending on timing + * the client session may close before we can read the timeout. + */ +sendMessageBlockInternal(opCode, payload, last, getTimeoutExpiry(timeout)); +} + + +private long getTimeoutExpiry(long timeout) { if (timeout < 0) { return Long.MAX_VALUE; } else { @@ -271,7 +276,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { } -private void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last, long timeoutExpiry) +private void sendMessageBlockInternal(byte opCode, ByteBuffer payload, boolean last, long timeoutExpiry) throws IOException { wsSession.updateLastActiveWrite(); diff --git a/java/org/apache/tomcat/websocket/WsSession.java b/java/org/apache/tomcat/websocket/WsSession.java index 0c1b2d18dd..7b66df3374 100644 --- a/java/org/apache/tomcat/websocket/WsSession.java +++ b/java/org/apache/tomcat/websocket/WsSession.java @@ -688,6 +688,22 @@ public class WsSession implements Session { } +/* + * Returns the session close timeout in milliseconds + */ +pri
Tagging May releases
Hi all, Things are looking good for the May releases. I have a few things to back-port to 10.1.x and 9.0.x and then I'll start running my pre-release tests. Providing everything passes (and CI runs suggest they will) I'll tag 11.0.x - probably some time tomorrow. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 04/04: Improvements to Japanese translations by tak7iji
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 commit a7f39b02334a4ca81a61c6670abcebe145458b7c Author: Mark Thomas AuthorDate: Thu May 2 15:34:12 2024 +0100 Improvements to Japanese translations by tak7iji --- java/org/apache/catalina/security/LocalStrings_ja.properties | 3 +++ java/org/apache/coyote/http2/LocalStrings_ja.properties | 2 +- webapps/docs/changelog.xml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/security/LocalStrings_ja.properties b/java/org/apache/catalina/security/LocalStrings_ja.properties index 03a34ffc59..a511ff1a0d 100644 --- a/java/org/apache/catalina/security/LocalStrings_ja.properties +++ b/java/org/apache/catalina/security/LocalStrings_ja.properties @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +SecurityListener.buildDateAgeUnreadable=設定された buildDateWarningAgeDays の値 [{0}] を読み取ることができません。デフォルトの [{1}] 日を使用します。 +SecurityListener.buildDateIsOld=このバージョンの Tomcat は {0} 日以上前にビルドされました。 現在のバージョンにアップグレードすることを検討してください。 +SecurityListener.buildDateUnreadable=サーバーのビルド日 [{0}] は ISO 8601 形式の日付として読み取ることができません。 SecurityListener.checkUmaskFail=[{0}] のumask設定で開始しようとしました。 少なくとも [{1}] と同じようにumaskを指定しないでTomcatを実行すると、ライフサイクルリスナーのorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf/server.xmlで構成されています)によってブロックされます SecurityListener.checkUmaskNone=システムプロパティ [{0}] にumask設定が見つかりませんでした。しかし、Tomcatはumaskをサポートするプラットフォームで動作しているようです。システムプロパティは通常、CATALINA_HOME/bin/catalina.shに設定されます。ライフサイクルリスナーのorg.apache.catalina.security.SecurityListener(通常はCATALINA_BASE/conf/server.xmlに設定されています)では、少なくとも [{1}] と同じくらい拘束されたumaskが必要です。 SecurityListener.checkUmaskParseFail=値[{0}]を有効なumaskとして解析できませんでした。 diff --git a/java/org/apache/coyote/http2/LocalStrings_ja.properties b/java/org/apache/coyote/http2/LocalStrings_ja.properties index 01bc7954b3..f72063af9b 100644 --- a/java/org/apache/coyote/http2/LocalStrings_ja.properties +++ b/java/org/apache/coyote/http2/LocalStrings_ja.properties @@ -130,7 +130,7 @@ upgradeHandler.allocate.left=コネクション [{0}]、ストリーム [{1}]、 upgradeHandler.connectionError=接続エラー upgradeHandler.enableRfc7450Priorities=接続 [{0}] は、RFC 7450 優先順位が初期接続設定フレームで無効にされた後に有効にならない場合があります (RFC 9218 を参照) upgradeHandler.fallToDebug=\n\ -\ 注: HTTP/2 ストリームのエラーがさらに発生すると、DEBUG レベルでログに記録されます。 +\ 注: 以降のHTTP/2 ストリームエラーの発生はDEBUGレベルでログに出力されます。 upgradeHandler.goaway.debug=コネクション [{0}]、Goaway、最終ストリーム [{1}]、エラーコード [{2}]、デバッグデータ [{3}] upgradeHandler.init=コネクション[{0}]、状態[{1}] upgradeHandler.invalidPreface=コネクション[{0}]、無効なConnection Preface diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 98c0ac90e3..76fa899f24 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -266,6 +266,9 @@ Update the internal fork of Apache Commons DBCP to 2.12.0. (markt) + +Improvements to Japanese translations by tak7iji. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/04: Fix translation and update RFC reference
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 commit 251a990ede251a0d911dcd2b3d5e3d85d7a6ae65 Author: Mark Thomas AuthorDate: Thu May 2 15:27:28 2024 +0100 Fix translation and update RFC reference --- java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties b/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties index a1be4a83bd..a4e90bd377 100644 --- a/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties +++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_fr.properties @@ -45,7 +45,7 @@ http.tooManyColons=Une adresse IPv6 ne peut pas contenir plus de deux caractère http.tooManyDoubleColons=Une adresse IPv6 ne peut contenir qu'une seule séquence "::" http.tooManyHextets=L''adresse IPv6 contient [{0}] groupes de 4 octets mais une adresse IPv6 valide ne doit pas en avoir plus de 8 -httpHeaderParser.invalidHeader=La ligne d''en-t�te HTTP [{0}] ne respecte pas la RFC 7230. La requ�te a �t� rejet�e. +httpHeaderParser.invalidHeader=La ligne d''en-tête HTTP [{0}] ne respecte pas la RFC 9112. La requête a été rejetée. sf.bareitem.invalidCharacter=Le caractère [{0}] invalide a été rencontré en début d''un objet sf.base64.invalidCharacter=Le caractère [{0}] est invalide dans une séquence base64 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/04: Fix BZ 68884 - improve handling of large scale WebSocket disconnects
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 commit 8b4ea8858bab738be2b1a68807fdcf61d6e5dc3f Author: Mark Thomas AuthorDate: Thu May 2 15:13:53 2024 +0100 Fix BZ 68884 - improve handling of large scale WebSocket disconnects --- java/org/apache/tomcat/websocket/Constants.java| 5 + .../tomcat/websocket/WsRemoteEndpointImplBase.java | 23 +- java/org/apache/tomcat/websocket/WsSession.java| 23 +- webapps/docs/changelog.xml | 12 +++ webapps/docs/web-socket-howto.xml | 14 +++-- 5 files changed, 65 insertions(+), 12 deletions(-) diff --git a/java/org/apache/tomcat/websocket/Constants.java b/java/org/apache/tomcat/websocket/Constants.java index f619c59642..8012d7989a 100644 --- a/java/org/apache/tomcat/websocket/Constants.java +++ b/java/org/apache/tomcat/websocket/Constants.java @@ -100,6 +100,11 @@ public class Constants { // Default is 30 seconds - setting is in milliseconds public static final long DEFAULT_SESSION_CLOSE_TIMEOUT = TimeUnit.SECONDS.toMillis(30); +// Configuration for session close timeout +public static final String ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT_PROPERTY = "org.apache.tomcat.websocket.ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT"; +// Default is 50 milliseconds - setting is in milliseconds +public static final long DEFAULT_ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT = 50; + // Configuration for read idle timeout on WebSocket session public static final String READ_IDLE_TIMEOUT_MS = "org.apache.tomcat.websocket.READ_IDLE_TIMEOUT_MS"; diff --git a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java index 9843a77115..bf41680478 100644 --- a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java +++ b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java @@ -240,7 +240,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { void sendMessageBlock(CharBuffer part, boolean last) throws IOException { -long timeoutExpiry = getTimeoutExpiry(); +long timeout = getBlockingSendTimeout(); boolean isDone = false; while (!isDone) { encoderBuffer.clear(); @@ -250,22 +250,27 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { } isDone = !cr.isOverflow(); encoderBuffer.flip(); -sendMessageBlock(Constants.OPCODE_TEXT, encoderBuffer, last && isDone, timeoutExpiry); +sendMessageBlock(Constants.OPCODE_TEXT, encoderBuffer, last && isDone, timeout); } stateMachine.complete(last); } void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last) throws IOException { -sendMessageBlock(opCode, payload, last, getTimeoutExpiry()); +sendMessageBlock(opCode, payload, last, getBlockingSendTimeout()); } -private long getTimeoutExpiry() { -// Get the timeout before we send the message. The message may -// trigger a session close and depending on timing the client -// session may close before we can read the timeout. -long timeout = getBlockingSendTimeout(); +void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last, long timeout) throws IOException { +/* + * Get the timeout before we send the message. The message may trigger a session close and depending on timing + * the client session may close before we can read the timeout. + */ +sendMessageBlockInternal(opCode, payload, last, getTimeoutExpiry(timeout)); +} + + +private long getTimeoutExpiry(long timeout) { if (timeout < 0) { return Long.MAX_VALUE; } else { @@ -274,7 +279,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { } -private void sendMessageBlock(byte opCode, ByteBuffer payload, boolean last, long timeoutExpiry) +private void sendMessageBlockInternal(byte opCode, ByteBuffer payload, boolean last, long timeoutExpiry) throws IOException { wsSession.updateLastActiveWrite(); diff --git a/java/org/apache/tomcat/websocket/WsSession.java b/java/org/apache/tomcat/websocket/WsSession.java index be16756bf4..5385cf038c 100644 --- a/java/org/apache/tomcat/websocket/WsSession.java +++ b/java/org/apache/tomcat/websocket/WsSession.java @@ -688,6 +688,22 @@ public class WsSession implements Session { } +/* + * Returns the session close timeout in milliseconds + */ +private long getAbnormalSessionCloseSendTimeout() { +long result = 0; +Object obj = userProperties.get(Constants.ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT_PROPERTY); +if (obj ins
(tomcat) 03/04: Update RFC reference
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 commit 7f348da583c7491dcec576833f656e325f6b8058 Author: Mark Thomas AuthorDate: Thu May 2 15:32:28 2024 +0100 Update RFC reference --- java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties b/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties index abde689744..a95ae9dc20 100644 --- a/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties +++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_ja.properties @@ -45,7 +45,7 @@ http.tooManyColons=IPv6 アドレスでは文字 : を 2 つ以上連続する http.tooManyDoubleColons=IPv6アドレスは単一の '::'シーケンスのみを含むことができます。 http.tooManyHextets=IPv6 アドレスは [{0}] ヘクステットで構成されていますが、正常な IPv6 アドレスなら 8 ヘクステット以上になりません。 -httpHeaderParser.invalidHeader=HTTP ヘッダーの [{0}] 行目は RFC 7230 に準拠していません。リクエストは拒否されました。 +httpHeaderParser.invalidHeader=HTTP ヘッダーの [{0}] 行目は RFC 9112 に準拠していません。リクエストは拒否されました。 sf.bareitem.invalidCharacter=ベアアイテムの開始を解析中に無効な文字 [{0}] が見つかりました sf.base64.invalidCharacter=文字 [{0}] は base64 シーケンス内では無効です - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated (6bd2cad423 -> a7f39b0233)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git from 6bd2cad423 Javadoc cleanup for Coyote new 8b4ea8858b Fix BZ 68884 - improve handling of large scale WebSocket disconnects new 251a990ede Fix translation and update RFC reference new 7f348da583 Update RFC reference new a7f39b0233 Improvements to Japanese translations by tak7iji The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../catalina/security/LocalStrings_ja.properties | 3 +++ .../apache/coyote/http2/LocalStrings_ja.properties | 2 +- .../util/http/parser/LocalStrings_fr.properties| 2 +- .../util/http/parser/LocalStrings_ja.properties| 2 +- java/org/apache/tomcat/websocket/Constants.java| 5 + .../tomcat/websocket/WsRemoteEndpointImplBase.java | 23 +- java/org/apache/tomcat/websocket/WsSession.java| 23 +- webapps/docs/changelog.xml | 15 ++ webapps/docs/web-socket-howto.xml | 14 +++-- 9 files changed, 74 insertions(+), 15 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 68884] Delayed HTTP Traffic Processing After Mass Websocket Disconnect/Reconnect
https://bz.apache.org/bugzilla/show_bug.cgi?id=68884 --- Comment #6 from Matt M --- (In reply to Christopher Schultz from comment #5) > I'm ignorant of the threading details of Websocket, so maybe this is a > stupid question: Could a single thread be used to perform these kinds of > cleanups, instead of an army of threads? That would let a single thread > trigger many session-shutdowns and only yield once for each of them. My understanding is that there is a single write semaphore per remote endpoint socket so the threads trying to write their close messages are in contention for that and yield rather than block waiting in tryAcquire which was the original behavior pre bz66508. The spin count in yield can run into the thousands even for a relatively short expiry period which puts additional pressure on the OS level thread scheduler. More than one http thread can be in this spin wait. Given that its waiting for a write semaphore, I am not sure if a dedicated close thread would help - I think a similar approach may have been used a while back in jetty. That write semaphore is used for any write, not just closures. Is this something that can be looked into for 9.0.89? -- 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 9.0.x updated: Javadoc cleanup for Coyote
This is an automated email from the ASF dual-hosted git repository. remm 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 5cb9912e1a Javadoc cleanup for Coyote 5cb9912e1a is described below commit 5cb9912e1ac87d0c725eeb54dcd8d53a6a78d55a Author: remm AuthorDate: Thu May 2 14:46:37 2024 +0200 Javadoc cleanup for Coyote --- java/org/apache/coyote/AbstractProcessor.java | 43 ++ java/org/apache/coyote/AbstractProcessorLight.java | 8 java/org/apache/coyote/AbstractProtocol.java | 3 -- java/org/apache/coyote/ActionCode.java | 12 ++ java/org/apache/coyote/Adapter.java| 16 +++- java/org/apache/coyote/Processor.java | 3 ++ java/org/apache/coyote/ajp/AjpProcessor.java | 6 --- .../apache/coyote/http11/Http11InputBuffer.java| 4 ++ .../apache/coyote/http11/Http11OutputBuffer.java | 9 + java/org/apache/coyote/http11/Http11Processor.java | 3 -- .../coyote/http11/filters/ChunkedInputFilter.java | 15 .../coyote/http11/filters/GzipOutputFilter.java| 6 +-- .../coyote/http11/filters/IdentityInputFilter.java | 14 +-- .../http11/filters/SavedRequestInputFilter.java| 11 ++ .../coyote/http11/filters/VoidInputFilter.java | 22 --- .../http11/upgrade/InternalHttpUpgradeHandler.java | 26 + .../apache/coyote/http2/AbstractNonZeroStream.java | 13 +++ java/org/apache/coyote/http2/AbstractStream.java | 38 +++ .../tomcat/util/net/ApplicationBufferHandler.java | 11 ++ 19 files changed, 181 insertions(+), 82 deletions(-) diff --git a/java/org/apache/coyote/AbstractProcessor.java b/java/org/apache/coyote/AbstractProcessor.java index 09bd45ea98..108aa82538 100644 --- a/java/org/apache/coyote/AbstractProcessor.java +++ b/java/org/apache/coyote/AbstractProcessor.java @@ -720,9 +720,17 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * When committing the response, we have to validate the set of headers, as well as setup the response filters. + * @throws IOException IO exception during commit + */ protected abstract void prepareResponse() throws IOException; +/** + * Finish the current response. + * @throws IOException IO exception during the write + */ protected abstract void finishResponse() throws IOException; @@ -735,21 +743,46 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * Process acknowledgment of the request. + * @param continueResponseTiming specifies when an acknowledgment should be sent + */ protected abstract void ack(ContinueResponseTiming continueResponseTiming); +/** + * Callback to write data from the buffer. + * @throws IOException IO exception during the write + */ protected abstract void flush() throws IOException; +/** + * Queries if bytes are available in buffers. + * @param doRead {@code true} to perform a read when no bytes are availble + * @return the amount of bytes that are known to be available + */ protected abstract int available(boolean doRead); +/** + * Set the specified byte chunk as the request body that will be read. This allows saving and + * processing requests. + * @param body the byte chunk containing all the request bytes + */ protected abstract void setRequestBody(ByteChunk body); +/** + * The response is finished and no additional bytes need to be sent to the client. + */ protected abstract void setSwallowResponse(); +/** + * Swallowing bytes is required for pipelining requests, so this allows to avoid doing extra operations + * in case an error occurs and the connection is to be closed instead. + */ protected abstract void disableSwallowRequest(); @@ -852,12 +885,22 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * @return {@code true} if it is known that the request body has been fully read + */ protected abstract boolean isRequestBodyFullyRead(); +/** + * When using non blocking IO, register to get a callback when polling determines that bytes + * are available for reading. + */ protected abstract void registerReadInterest(); +/** + * @return {@code true} if bytes can be written without blocking + */ protected abstract boolean isReadyForWrite(); diff --git a/java/org/apache/coyote/AbstractProcessorLight.java b/java/org/apache/coyote/AbstractProcessorLight.java index 8948f145e2..5ff9c5f79b 100644 --- a/java/org/apache/coyote/AbstractProcessorLight.java +++ b/java/org/apache/coyote/AbstractProcessorLight.java @@ -185,7 +185,15 @@ publ
(tomcat) branch 10.1.x updated: Javadoc cleanup for Coyote
This is an automated email from the ASF dual-hosted git repository. remm 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 1b1591a02e Javadoc cleanup for Coyote 1b1591a02e is described below commit 1b1591a02ebc819bc3ccc8aa5c921fce76352ce2 Author: remm AuthorDate: Thu May 2 14:46:37 2024 +0200 Javadoc cleanup for Coyote --- java/org/apache/coyote/AbstractProcessor.java | 43 ++ java/org/apache/coyote/AbstractProcessorLight.java | 8 java/org/apache/coyote/AbstractProtocol.java | 3 -- java/org/apache/coyote/ActionCode.java | 12 ++ java/org/apache/coyote/Adapter.java| 16 +++- java/org/apache/coyote/Processor.java | 3 ++ java/org/apache/coyote/ajp/AjpProcessor.java | 6 --- .../apache/coyote/http11/Http11InputBuffer.java| 4 ++ .../apache/coyote/http11/Http11OutputBuffer.java | 9 + java/org/apache/coyote/http11/Http11Processor.java | 3 -- .../coyote/http11/filters/ChunkedInputFilter.java | 15 .../coyote/http11/filters/GzipOutputFilter.java| 6 +-- .../coyote/http11/filters/IdentityInputFilter.java | 14 +-- .../http11/filters/SavedRequestInputFilter.java| 11 ++ .../coyote/http11/filters/VoidInputFilter.java | 22 --- .../http11/upgrade/InternalHttpUpgradeHandler.java | 26 + .../apache/coyote/http2/AbstractNonZeroStream.java | 13 +++ java/org/apache/coyote/http2/AbstractStream.java | 38 +++ .../tomcat/util/net/ApplicationBufferHandler.java | 11 ++ 19 files changed, 181 insertions(+), 82 deletions(-) diff --git a/java/org/apache/coyote/AbstractProcessor.java b/java/org/apache/coyote/AbstractProcessor.java index c61be06dd6..49a7882712 100644 --- a/java/org/apache/coyote/AbstractProcessor.java +++ b/java/org/apache/coyote/AbstractProcessor.java @@ -721,27 +721,60 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * When committing the response, we have to validate the set of headers, as well as setup the response filters. + * @throws IOException IO exception during commit + */ protected abstract void prepareResponse() throws IOException; +/** + * Finish the current response. + * @throws IOException IO exception during the write + */ protected abstract void finishResponse() throws IOException; +/** + * Process acknowledgment of the request. + * @param continueResponseTiming specifies when an acknowledgment should be sent + */ protected abstract void ack(ContinueResponseTiming continueResponseTiming); +/** + * Callback to write data from the buffer. + * @throws IOException IO exception during the write + */ protected abstract void flush() throws IOException; +/** + * Queries if bytes are available in buffers. + * @param doRead {@code true} to perform a read when no bytes are availble + * @return the amount of bytes that are known to be available + */ protected abstract int available(boolean doRead); +/** + * Set the specified byte chunk as the request body that will be read. This allows saving and + * processing requests. + * @param body the byte chunk containing all the request bytes + */ protected abstract void setRequestBody(ByteChunk body); +/** + * The response is finished and no additional bytes need to be sent to the client. + */ protected abstract void setSwallowResponse(); +/** + * Swallowing bytes is required for pipelining requests, so this allows to avoid doing extra operations + * in case an error occurs and the connection is to be closed instead. + */ protected abstract void disableSwallowRequest(); @@ -844,12 +877,22 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * @return {@code true} if it is known that the request body has been fully read + */ protected abstract boolean isRequestBodyFullyRead(); +/** + * When using non blocking IO, register to get a callback when polling determines that bytes + * are available for reading. + */ protected abstract void registerReadInterest(); +/** + * @return {@code true} if bytes can be written without blocking + */ protected abstract boolean isReadyForWrite(); diff --git a/java/org/apache/coyote/AbstractProcessorLight.java b/java/org/apache/coyote/AbstractProcessorLight.java index 8948f145e2..5ff9c5f79b 100644 --- a/java/org/apache/coyote/AbstractProcessorLight.java +++ b/java/org/apache/coyote/AbstractProcessorLight.java @@ -185,7 +185,15 @@ public abstract class AbstractProcessorLight implements Processor { */ protected abstract SocketState di
(tomcat) branch main updated: Javadoc cleanup for Coyote
This is an automated email from the ASF dual-hosted git repository. remm 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 6bd2cad423 Javadoc cleanup for Coyote 6bd2cad423 is described below commit 6bd2cad4231a7ecd429b86005efe005cf9532d5b Author: remm AuthorDate: Thu May 2 14:46:37 2024 +0200 Javadoc cleanup for Coyote --- java/org/apache/coyote/AbstractProcessor.java | 43 ++ java/org/apache/coyote/AbstractProcessorLight.java | 9 + java/org/apache/coyote/AbstractProtocol.java | 3 -- java/org/apache/coyote/ActionCode.java | 12 ++ java/org/apache/coyote/Adapter.java| 16 +++- java/org/apache/coyote/Processor.java | 3 ++ java/org/apache/coyote/ajp/AjpProcessor.java | 6 --- .../apache/coyote/http11/Http11InputBuffer.java| 4 ++ .../apache/coyote/http11/Http11OutputBuffer.java | 9 + java/org/apache/coyote/http11/Http11Processor.java | 3 -- .../coyote/http11/filters/ChunkedInputFilter.java | 15 .../coyote/http11/filters/GzipOutputFilter.java| 6 +-- .../coyote/http11/filters/IdentityInputFilter.java | 14 +-- .../http11/filters/SavedRequestInputFilter.java| 11 ++ .../coyote/http11/filters/VoidInputFilter.java | 22 --- .../http11/upgrade/InternalHttpUpgradeHandler.java | 26 + .../apache/coyote/http2/AbstractNonZeroStream.java | 13 +++ java/org/apache/coyote/http2/AbstractStream.java | 38 +++ .../tomcat/util/net/ApplicationBufferHandler.java | 11 ++ 19 files changed, 182 insertions(+), 82 deletions(-) diff --git a/java/org/apache/coyote/AbstractProcessor.java b/java/org/apache/coyote/AbstractProcessor.java index 31d2cd7fd3..21a7ef2304 100644 --- a/java/org/apache/coyote/AbstractProcessor.java +++ b/java/org/apache/coyote/AbstractProcessor.java @@ -713,27 +713,60 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * When committing the response, we have to validate the set of headers, as well as setup the response filters. + * @throws IOException IO exception during commit + */ protected abstract void prepareResponse() throws IOException; +/** + * Finish the current response. + * @throws IOException IO exception during the write + */ protected abstract void finishResponse() throws IOException; +/** + * Process acknowledgment of the request. + * @param continueResponseTiming specifies when an acknowledgment should be sent + */ protected abstract void ack(ContinueResponseTiming continueResponseTiming); +/** + * Callback to write data from the buffer. + * @throws IOException IO exception during the write + */ protected abstract void flush() throws IOException; +/** + * Queries if bytes are available in buffers. + * @param doRead {@code true} to perform a read when no bytes are availble + * @return the amount of bytes that are known to be available + */ protected abstract int available(boolean doRead); +/** + * Set the specified byte chunk as the request body that will be read. This allows saving and + * processing requests. + * @param body the byte chunk containing all the request bytes + */ protected abstract void setRequestBody(ByteChunk body); +/** + * The response is finished and no additional bytes need to be sent to the client. + */ protected abstract void setSwallowResponse(); +/** + * Swallowing bytes is required for pipelining requests, so this allows to avoid doing extra operations + * in case an error occurs and the connection is to be closed instead. + */ protected abstract void disableSwallowRequest(); @@ -838,12 +871,22 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement } +/** + * @return {@code true} if it is known that the request body has been fully read + */ protected abstract boolean isRequestBodyFullyRead(); +/** + * When using non blocking IO, register to get a callback when polling determines that bytes + * are available for reading. + */ protected abstract void registerReadInterest(); +/** + * @return {@code true} if bytes can be written without blocking + */ protected abstract boolean isReadyForWrite(); diff --git a/java/org/apache/coyote/AbstractProcessorLight.java b/java/org/apache/coyote/AbstractProcessorLight.java index 2a429e7b1b..4a371c1f53 100644 --- a/java/org/apache/coyote/AbstractProcessorLight.java +++ b/java/org/apache/coyote/AbstractProcessorLight.java @@ -185,7 +185,16 @@ public abstract class AbstractProcessorLight implements Processor { */ protected abstract SocketState dispa