From 95ac44e6e5c096f499ca1f5fe31cb8416b1d619d Mon Sep 17 00:00:00 2001 From: hno <> Date: Mon, 18 Oct 2004 18:16:22 +0000 Subject: [PATCH] Bug #1000: Content gets corrupted during upload --- src/client_side.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client_side.cc b/src/client_side.cc index 9bc0ff07c7..89eb746472 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.672 2004/09/26 21:40:29 hno Exp $ + * $Id: client_side.cc,v 1.673 2004/10/18 12:16:22 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2431,8 +2431,14 @@ clientReadRequest(int fd, char *buf, size_t size, comm_err_t flag, int xerrno, if (flag == COMM_OK) { if (size > 0) { + char *current_buf = conn->in.addressToReadInto(); kb_incr(&statCounter.client_http.kbytes_in, size); + + if (buf != current_buf) + xmemmove(current_buf, buf, size); + conn->in.notYetUsed += size; + conn->in.buf[conn->in.notYetUsed] = '\0'; /* Terminate the string */ } else if (size == 0) { debug(33, 5) ("clientReadRequest: FD %d closed?\n", fd); -- 2.47.3