This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new ffd2cb8  [SCB-2338]highway should not have a default response body 
limit of 20M (#2588)
ffd2cb8 is described below

commit ffd2cb8da165f1e5514a27f12bba680a12168d73
Author: liubao68 <[email protected]>
AuthorDate: Fri Sep 17 18:15:14 2021 +0800

    [SCB-2338]highway should not have a default response body limit of 20M 
(#2588)
---
 .../org/apache/servicecomb/foundation/vertx/server/TcpParser.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpParser.java
 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpParser.java
index d89e8f0..9127300 100644
--- 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpParser.java
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpParser.java
@@ -32,8 +32,6 @@ import io.vertx.core.parsetools.RecordParser;
 public class TcpParser implements Handler<Buffer> {
   public static final byte[] TCP_MAGIC;
 
-  public static final int TCP_MAX_REQUEST_LENGTH = 20 * 1024 * 1024;
-
   public static final int TCP_HEADER_LENGTH = 23;
 
   static {
@@ -102,7 +100,7 @@ public class TcpParser implements Handler<Buffer> {
         msgId = buf.readLong();
         totalLen = buf.readInt();
         headerLen = buf.readInt();
-        if (headerLen > totalLen || headerLen <= 0 || totalLen > 
TCP_MAX_REQUEST_LENGTH) {
+        if (headerLen > totalLen || headerLen <= 0) {
           throw new IllegalStateException("possibly attack.");
         }
 

Reply via email to