Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/6147#discussion_r195065850 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/FileUploadHandler.java --- @@ -89,7 +89,7 @@ protected void channelRead0(final ChannelHandlerContext ctx, final HttpObject ms final HttpContent httpContent = (HttpContent) msg; currentHttpPostRequestDecoder.offer(httpContent); - while (currentHttpPostRequestDecoder.hasNext()) { --- End diff -- The failure was triggered every-time i attempted to upload anything, but i may very well depend on the payload size. Your analysis is mostly correct, what's missing is that decoder switches into the `EPILOGUE` state when being offered a `LastHttpContent`. If this last message is not empty the exception is not thrown since data is still available, checked in `hasNext` via `this.bodyListHttpDataRank >= this.bodyListHttpData.size()`.
---