[ https://issues.apache.org/jira/browse/FLINK-10115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587279#comment-16587279 ]
ASF GitHub Bot commented on FLINK-10115: ---------------------------------------- zentol opened a new pull request #6595: [FLINK-10115][rest] Ignore content-length limit for file uploads URL: https://github.com/apache/flink/pull/6595 ## What is the purpose of the change With this PR the server-side content-length limit (configurable via `rest.server.max-content-length`, enforced by the `HttpObjectAggregator`) is no longer applied to file uploads. File uploads are handle before the aggregator is active; in fact the contents of the files are not visible to the aggregator, thus the aggregator should be a no-op. We however never sanitized the headers to actually reflect this, i.e. the `content-length` header may still be set to the size of the file, and the `content-type` header may still claim to be a `multipart` request. Both headers are now properly updated after the `FileUploadHandler` finishes processing the file upload. ## Brief change log * add a number of trace logging messages to better track what the FileUploadHandler is doing * update headers in `FileUploadHandler` when processing has finished * if the multipart request also contained a JSON payload then `content-length` will be set to the size of the serialized json payload, and `content-type` to our default JSON content-type. * if the multipart request did not contain a JSON payload then `content-length` will be 0 with no `content-type`. * set server-side limit in `MultipartUploadResource` to 1mb, which is significantly lower than the to-be-uploaded file (64mb) ## Verifying this change The `MultipartUploadResource` was modified to set the server-side limit to a *(Please pick either of the following options)* This change is a trivial rework / code cleanup without any test coverage. *(or)* This change is already covered by existing tests that use the `MultipartUploadResource`. ---------------------------------------------------------------- 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)