poorbarcode commented on code in PR #19514:
URL: https://github.com/apache/pulsar/pull/19514#discussion_r1107295017


##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/WebServer.java:
##########
@@ -214,6 +218,13 @@ public void addServlet(String basePath, ServletHolder 
servletHolder,
         handlers.add(context);
     }
 
+    private static void popularServletParams(ServletHolder servletHolder, 
ProxyConfiguration config){
+        if (config.getHttpClientRequestBufferSize() > 0 || 
config.getHttpMaxRequestHeaderSize() > 0){
+            int v = Math.max(config.getHttpClientRequestBufferSize(), 
config.getHttpMaxRequestHeaderSize());
+            servletHolder.setInitParameter(INIT_PARAM_REQUEST_BUFFER_SIZE, 
String.valueOf(v));
+        }
+    }

Review Comment:
   The HTTP client in Jetty will create a ByteBuf which is sized 
"requestBufferSize" to cache the data of the request line, if the ByteBuf is 
not enough to handle the data of the request line(contains URI), it will throw 
a BadMessageException



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to