]> granicus.if.org Git - curl/commitdiff
mime: do not reuse previously computed multipart size
authorPatrick Monnerat <patrick@monnerat.net>
Fri, 20 Oct 2017 12:57:12 +0000 (13:57 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Fri, 20 Oct 2017 12:57:12 +0000 (13:57 +0100)
The contents might have changed: size must be recomputed.

Reported-by: moteus on github
Fixes #1999

lib/mime.c

index d9b7f524eeb7199391c136300e6c7b29e292c8cd..07eded7232a17ba99288442c07a61868db5f06ac 100644 (file)
@@ -1523,7 +1523,7 @@ curl_off_t Curl_mime_size(curl_mimepart *part)
 {
   curl_off_t size;
 
-  if(part->datasize < 0 && part->kind == MIMEKIND_MULTIPART)
+  if(part->kind == MIMEKIND_MULTIPART)
     part->datasize = multipart_size(part->arg);
 
   size = part->datasize;