1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

FTP: fix uploading ASCII with unknown size

... don't try to increase the supposed file size on newlines if we don't
know what file size it is!

Patch-by: lzsiga
This commit is contained in:
Daniel Stenberg 2015-09-26 23:36:25 +02:00
parent 119037325d
commit 32fc638ddf

View File

@ -923,7 +923,8 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
if(!data->set.crlf) { if(!data->set.crlf) {
/* we're here only because FTP is in ASCII mode... /* we're here only because FTP is in ASCII mode...
bump infilesize for the LF we just added */ bump infilesize for the LF we just added */
data->state.infilesize++; if(data->state.infilesize != -1)
data->state.infilesize++;
} }
} }
else else