From: wessels <> Date: Sat, 16 May 1998 02:02:10 +0000 (+0000) Subject: Henrik: X-Git-Tag: SQUID_3_0_PRE1~3312 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b7b8eddf93ff6eb7c1aaa21c110534b75f67b1b;p=thirdparty%2Fsquid.git Henrik: lseek/don't close file for PUT requests --- diff --git a/src/client.cc b/src/client.cc index 15bcc611e3..4b3bc22353 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,6 +1,6 @@ /* - * $Id: client.cc,v 1.66 1998/05/11 18:44:33 rousskov Exp $ + * $Id: client.cc,v 1.67 1998/05/15 20:02:10 wessels Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived @@ -343,6 +343,7 @@ main(int argc, char *argv[]) } if (put_file) { int x; + lseek(put_fd, 0, SEEK_SET); while ((x = read(put_fd, msg, BUFSIZ)) > 0) { x = write(conn, msg, x); total_bytes += x; @@ -351,7 +352,6 @@ main(int argc, char *argv[]) } if (x != 0) fprintf(stderr, "client: ERROR: Cannot send file.\n"); - close(put_fd); } /* Read the data */