--------------------- PatchSet 1504 Date: 2001/02/07 02:23:41 Author: rbcollins Branch: rbcollins_filters Tag: (none) Log: bugfix: don't write null buffers :] Members: src/client_side.c:1.1.1.3.4.1.4.15.2.24->1.1.1.3.4.1.4.15.2.25 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.1.1.3.4.1.4.15.2.24 retrieving revision 1.1.1.3.4.1.4.15.2.25 diff -u -r1.1.1.3.4.1.4.15.2.24 -r1.1.1.3.4.1.4.15.2.25 --- squid/src/client_side.c 6 Feb 2001 14:10:41 -0000 1.1.1.3.4.1.4.15.2.24 +++ squid/src/client_side.c 7 Feb 2001 02:23:41 -0000 1.1.1.3.4.1.4.15.2.25 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.1.1.3.4.1.4.15.2.24 2001/02/06 14:10:41 rbcollins Exp $ + * $Id: client_side.c,v 1.1.1.3.4.1.4.15.2.25 2001/02/07 02:23:41 rbcollins Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1987,13 +1987,16 @@ /* we are the last of the mohicans */ assert(filters->node.next==NULL); + assert((buf && len) || (flags & (FILTER_EOF | FILTER_ABORT))); - debug (33,8)("clientDoCommWriteMemBuf: buf %p len %d\n",buf,len); + debug (33,8)("clientDoCommWriteMemBuf: buf %p len %d flags %d\n",buf,len,flags); if (!buf || !len) { /* No new data to write */ /* if not EOF, then some error occured upstream... abort here TODO */ clientWriteComplete(http->conn->fd, NULL, 0, 0, http); /* TODO: when we start buffer blocks here, this is where we flush the buffer */ + /* Why? calling clientWriteComplete flushes the buffer too */ + return 0; } /* there is data to write. Concept: buffer 4K/client sock buf/ whatever here