[
https://issues.apache.org/jira/browse/SLING-5702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286249#comment-15286249
]
Stefan Egli commented on SLING-5702:
------------------------------------
[~cziegeler], good point, from a code point of view it doesn't seem obvious
that this can happen (but I've seen it happen, see SLING-5701).
Could it be that {{value.getSize()}} changes over time (during the {{setFile}}
call)?
> 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)