]> granicus.if.org Git - curl/commitdiff
detect if chunked transfers are aborted
authorDaniel Stenberg <daniel@haxx.se>
Fri, 16 Mar 2001 15:45:12 +0000 (15:45 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Mar 2001 15:45:12 +0000 (15:45 +0000)
lib/transfer.c

index edbff71ffe5994430d7178fb9403ae34c65eb6e5..aafebdc89f0e30d508129f109223220d69b6bae7 100644 (file)
@@ -689,6 +689,11 @@ Transfer(struct connectdata *c_conn)
           contentlength-bytecount);
     return CURLE_PARTIAL_FILE;
   }
+  else if(conn->bits.chunk && conn->proto.http->chunk.datasize) {
+    failf(data, "transfer closed with at least %d bytes remaining",
+          conn->proto.http->chunk.datasize);
+    return CURLE_PARTIAL_FILE;
+  }
   if(Curl_pgrsUpdate(data))
     return CURLE_ABORTED_BY_CALLBACK;