You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/04/29 13:26:14 UTC
[tomcat] branch master updated: Add i18n to two Hpack exceptions
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 81efd6a Add i18n to two Hpack exceptions
81efd6a is described below
commit 81efd6a21bb38b600e2124fa4d1a2fb2e84da12b
Author: remm <re...@apache.org>
AuthorDate: Mon Apr 29 15:26:04 2019 +0200
Add i18n to two Hpack exceptions
---
java/org/apache/coyote/http2/HpackDecoder.java | 5 +++--
java/org/apache/coyote/http2/LocalStrings.properties | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/coyote/http2/HpackDecoder.java b/java/org/apache/coyote/http2/HpackDecoder.java
index ea55a08..551101b 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -171,7 +171,8 @@ public class HpackDecoder {
return false;
}
if (size > maxMemorySizeHard) {
- throw new HpackException();
+ throw new HpackException(sm.getString("hpackdecoder.maxMemorySizeExceeded",
+ Integer.valueOf(size), Integer.valueOf(maxMemorySizeHard)));
}
maxMemorySizeSoft = size;
if (currentMemorySize > maxMemorySizeSoft) {
@@ -249,7 +250,7 @@ public class HpackDecoder {
int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH);
Hpack.HeaderField res = headerTable[adjustedIndex];
if (res == null) {
- throw new HpackException();
+ throw new HpackException(sm.getString("hpackdecoder.nullHeader", Integer.valueOf(index)));
}
return res.name;
}
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties
index b2ac336..2c3e5c0 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -37,7 +37,9 @@ hpack.invalidCharacter=The Unicode character [{0}] at code point [{1}] cannot be
hpackEncoder.encodeHeader=Encoding header [{0}] with value [{1}]
hpackdecoder.headerTableIndexInvalid=The header table index [{0}] is not valid as there are [{1}] static entries and [{2}] dynamic entries
+hpackdecoder.maxMemorySizeExceeded=The header table size [{0}] exceeds the maximum size [{1}]
hpackdecoder.notImplemented=Not yet implemented
+hpackdecoder.nullHeader=Null header at index [{0}]
hpackdecoder.tableSizeUpdateNotAtStart=Any table size update must be sent at the start of a header block
hpackdecoder.zeroNotValidHeaderTableIndex=Zero is not a valid header table index
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org