[ https://issues.apache.org/jira/browse/FLINK-10115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587282#comment-16587282 ]
ASF GitHub Bot commented on FLINK-10115: ---------------------------------------- zentol commented on a change in pull request #6595: [FLINK-10115][rest] Ignore content-length limit for file uploads URL: https://github.com/apache/flink/pull/6595#discussion_r211561089 ########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/FileUploadHandler.java ########## @@ -134,12 +140,18 @@ protected void channelRead0(final ChannelHandlerContext ctx, final HttpObject ms } if (httpContent instanceof LastHttpContent) { + LOG.trace("Finalizing multipart file upload."); ctx.channel().attr(UPLOADED_FILES).set(new FileUploads(currentUploadDir)); - ctx.fireChannelRead(currentHttpRequest); if (currentJsonPayload != null) { + currentHttpRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, currentJsonPayload.length); + currentHttpRequest.headers().set(HttpHeaders.Names.CONTENT_TYPE, RestConstants.REST_CONTENT_TYPE); + ctx.fireChannelRead(currentHttpRequest); ctx.fireChannelRead(httpContent.replace(Unpooled.wrappedBuffer(currentJsonPayload))); } else { - ctx.fireChannelRead(ReferenceCountUtil.retain(httpContent)); Review comment: Forwarding a single httpContent object that may or may not contain content always seemed fishy to me, so we now always send an `EMPTY_LAST_CONTENT` object instead. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Content-length limit is also applied to FileUploads > --------------------------------------------------- > > Key: FLINK-10115 > URL: https://issues.apache.org/jira/browse/FLINK-10115 > Project: Flink > Issue Type: Bug > Components: REST, Webfrontend > Affects Versions: 1.6.0 > Reporter: Yazdan Shirvany > Assignee: Chesnay Schepler > Priority: Major > Labels: pull-request-available > Fix For: 1.6.1 > > > Uploading jar files via WEB UI not working. After {{initializing upload...}} > it only shows {{saving...}} and file never shows up on UI to be able to > submit it -- This message was sent by Atlassian JIRA (v7.6.3#76005)