You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/24 13:24:21 UTC

[tomcat] 01/02: Back-port i18n updates from master

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

commit d5ae396e0803a057327343a02623b171ec12eac9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 24 14:23:22 2019 +0100

    Back-port i18n updates from master
---
 java/org/apache/coyote/http2/HpackDecoder.java       | 7 ++++---
 java/org/apache/coyote/http2/LocalStrings.properties | 5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/HpackDecoder.java b/java/org/apache/coyote/http2/HpackDecoder.java
index 2c68573..ea88aab 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -155,7 +155,7 @@ public class HpackDecoder {
                     return;
                 }
             } else {
-                throw new RuntimeException("Not yet implemented");
+                throw new RuntimeException(sm.getString("hpackdecoder.notImplemented"));
             }
         }
     }
@@ -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 88c8970..e371865 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -15,7 +15,7 @@
 
 abstractStream.windowSizeDec=Connection [{0}], Stream [{1}], reduce flow control window by [{2}] to [{3}]
 abstractStream.windowSizeInc=Connection [{0}], Stream [{1}], increase flow control window by [{2}] to [{3}]
-abstractStream.windowSizeTooBig=Connection [{0}], Stream [{1}], increase in window size of [{2}] to [{3}] exceeded permitted maximum
+abstractStream.windowSizeTooBig=Connection [{0}], Stream [{1}], increased window size by [{2}] to [{3}] which exceeded permitted maximum
 
 connectionPrefaceParser.eos=Unexpected end of stream while reading opening client preface byte sequence. Only [{0}] bytes read.
 connectionPrefaceParser.ioError=Failed to read opening client preface byte sequence
@@ -37,6 +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