Croway commented on code in PR #12208:
URL: https://github.com/apache/camel/pull/12208#discussion_r1410500341


##########
components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpConsumer.java:
##########
@@ -63,51 +64,64 @@ protected void doStart() throws Exception {
     private ContextHandler createHandler(PlatformHttpEndpoint endpoint, String 
path) {
         ContextHandler contextHandler = new ContextHandler();
         contextHandler.setContextPath(path);
-        contextHandler.setResourceBase(".");
+        contextHandler.setBaseResourceAsString(".");
         
contextHandler.setClassLoader(Thread.currentThread().getContextClassLoader());
-        contextHandler.setAllowNullPathInfo(true);
-        contextHandler.setHandler(new AbstractHandler() {
+        contextHandler.setAllowNullPathInContext(true);
+
+        contextHandler.setHandler(new Handler.Abstract() {
             @Override
-            public void handle(
-                    String s, Request request, HttpServletRequest 
httpServletRequest, HttpServletResponse httpServletResponse) {
+            public boolean handle(Request request, Response response, Callback 
callback) throws Exception {
                 Exchange exchg = null;
                 try {
-                    BufferedReader reader = httpServletRequest.getReader();
                     String bodyRequest = "";
-                    String strCurrentLine;
-                    while ((strCurrentLine = reader.readLine()) != null) {
-                        bodyRequest += strCurrentLine;
+                    while (true) {
+                        Content.Chunk chunk = request.read();
+                        if (chunk.isLast()) {
+                            break;
+                        }
+
+                        byte[] bytes = new 
byte[chunk.getByteBuffer().remaining()];

Review Comment:
   I tried to, but seems like that jetty is messing a bit with the ByteBuffer, 
and the .array() is null



-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to