mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:53:33 +03:00
INFILESIZE: fields in UserDefined must not be changed run-time
set.infilesize in this case was modified in several places, which could lead to repeated requests using the same handle to get unintendent/wrong consequences based on what the previous request did!
This commit is contained in:
parent
9c941e92c4
commit
d5ec44ca4c
13 changed files with 57 additions and 51 deletions
|
|
@ -926,7 +926,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
|
|||
if(!data->set.crlf) {
|
||||
/* we're here only because FTP is in ASCII mode...
|
||||
bump infilesize for the LF we just added */
|
||||
data->set.infilesize++;
|
||||
data->state.infilesize++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -967,7 +967,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
|
|||
|
||||
k->writebytecount += bytes_written;
|
||||
|
||||
if(k->writebytecount == data->set.infilesize) {
|
||||
if(k->writebytecount == data->state.infilesize) {
|
||||
/* we have sent all data we were supposed to */
|
||||
k->upload_done = TRUE;
|
||||
infof(data, "We are completely uploaded and fine\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue