Commit beb61ef4 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Mohun Biswas found out that formposting a zero-byte file didn't work very

good. I fixed.
parent 72aff747
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@

                                  Changelog

Daniel (25 October 2004)
- Mohun Biswas found out that formposting a zero-byte file didn't work very
  good. I fixed.

Daniel (19 October 2004)
- Alexander Krasnostavsky made it possible to make FTP 3rd party transfers
  with both source and destination being the same host. It can be useful if
+6 −2
Original line number Diff line number Diff line
@@ -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) {