You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2022/09/02 06:21:56 UTC

[incubator-eventmesh] branch master updated: fix webhook request type convert error

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

chenguangsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new ab1b5592 fix webhook request type convert error
     new 703ff366 Merge pull request #1215 from horoc/fix-webhook-request-type-convert-error
ab1b5592 is described below

commit ab1b55928ffd1f47e584dd6b33bc1d9ab0ffc8c1
Author: horoc <ho...@gmail.com>
AuthorDate: Thu Sep 1 22:40:22 2022 +0800

    fix webhook request type convert error
---
 .../runtime/core/protocol/http/processor/WebHookProcessor.java         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/WebHookProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/WebHookProcessor.java
index 2bc878fa..94ce4ef6 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/WebHookProcessor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/WebHookProcessor.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import io.netty.handler.codec.http.DefaultFullHttpRequest;
+import io.netty.handler.codec.http.FullHttpRequest;
 import io.netty.handler.codec.http.HttpRequest;
 import io.netty.handler.codec.http.HttpResponse;
 
@@ -48,7 +49,7 @@ public class WebHookProcessor implements HttpProcessor {
             for (Map.Entry<String, String> entry : httpRequest.headers().entries()) {
                 header.put(entry.getKey().toLowerCase(), entry.getValue());
             }
-            byte[] bytes = ((DefaultFullHttpRequest) httpRequest).content().array();
+            byte[] bytes = ((FullHttpRequest) httpRequest).content().array();
             webHookController.execute(httpRequest.uri(), header, bytes);
             return HttpResponseUtils.createSuccess();
         } catch (Exception e) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org