Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6178#discussion_r196554025
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/AbstractHandler.java 
---
    @@ -103,77 +104,74 @@ protected void respondAsLeader(ChannelHandlerContext 
ctx, RoutedRequest routedRe
                                return;
                        }
     
    -                   ByteBuf msgContent = ((FullHttpRequest) 
httpRequest).content();
    +                   final ByteBuf msgContent;
    +                   Optional<byte[]> multipartJsonPayload = 
FileUploadHandler.getMultipartJsonPayload(ctx);
    +                   if (multipartJsonPayload.isPresent()) {
    +                           msgContent = 
Unpooled.wrappedBuffer(multipartJsonPayload.get());
    --- End diff --
    
    Let's send the Json payload as a proper `HttpRequest`, then we don't have 
this special casing here.


---

Reply via email to