mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:57:18 +03:00
Mohun Biswas found out that formposting a zero-byte file didn't work very
good. I fixed.
This commit is contained in:
parent
72aff74798
commit
beb61ef429
2 changed files with 10 additions and 2 deletions
|
|
@ -1307,9 +1307,13 @@ size_t Curl_FormReader(char *buffer,
|
|||
if(!form->data)
|
||||
return 0; /* nothing, error, empty */
|
||||
|
||||
if(form->data->type == FORM_FILE)
|
||||
return readfromfile(form, buffer, wantedsize);
|
||||
if(form->data->type == FORM_FILE) {
|
||||
gotsize = readfromfile(form, buffer, wantedsize);
|
||||
|
||||
if(gotsize)
|
||||
/* If positive or -1, return. If zero, continue! */
|
||||
return gotsize;
|
||||
}
|
||||
do {
|
||||
|
||||
if( (form->data->length - form->sent ) > wantedsize - gotsize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue