]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Henrik:
authorwessels <>
Sat, 16 May 1998 02:02:10 +0000 (02:02 +0000)
committerwessels <>
Sat, 16 May 1998 02:02:10 +0000 (02:02 +0000)
lseek/don't close file for PUT requests

src/client.cc

index 15bcc611e3d86e7cd3d93f8be77166aed54ce9fa..4b3bc22353784211fa26961e96d11c60ac190152 100644 (file)
@@ -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 */