/* This is a literal response, setup to receive the body data */
infof(data, "Found %" FMT_OFF_T " bytes to download", size);
- /* Progress size includes both header line and literal body */
- Curl_pgrsSetDownloadSize(data, size + len);
/* First write the header line */
result = Curl_client_write(data, CLIENTWRITE_BODY, line, len);
else
size += len;
+ /* Progress size includes both header line and literal body */
+ Curl_pgrsSetDownloadSize(data, size);
+
if(data->req.bytecount == size)
/* All data already transferred (header + literal body) */
Curl_xfer_setup_nop(data);