[
https://issues.apache.org/jira/browse/SLING-5702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15281268#comment-15281268
]
Carsten Ziegeler commented on SLING-5702:
-----------------------------------------
Looking at the code, I don't see how this can happen,
SlingFileUploadHandler#setFile in line 521 does this:
if (value.isFormField() || value.getSize() <= 0) {
continue;
}
> SlingFileUploadHandler creates unnecessary chunk when upload part is empty
> --------------------------------------------------------------------------
>
> Key: SLING-5702
> URL: https://issues.apache.org/jira/browse/SLING-5702
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Post 2.3.10
> Reporter: Stefan Egli
> Fix For: Servlets Post 2.3.12
>
>
> SlingFileUploadHandler in
> [{{processChunk}}|https://github.com/apache/sling/blob/ded7f8d657ff54711d6e9bd7d6f76cca67c89df6/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingFileUploadHandler.java#L311]
> can create an oddly formatted chunk when {{value.getSize()==0}} - ie when an
> upload doesn't actually upload anything. This has been seen in a production
> case. It's not yet clear why {{processChunk}} is called with a data length of
> zero.
> The result is that you'll have a chunk named '{{chunk_n_n-1}}' which later on
> causes troubles when running the {{ChunkCleanUpTask}} (see SLING-5701).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)