--------------------- PatchSet 6573 Date: 2005/03/30 18:51:05 Author: chtsanti Branch: icap-2_5 Tag: (none) Log: If the remote http server closed the connection before the overal request data sent the squids died with segmentation fault. Members: src/icap_reqmod.c:1.1.2.39->1.1.2.40 Index: squid/src/icap_reqmod.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_reqmod.c,v retrieving revision 1.1.2.39 retrieving revision 1.1.2.40 diff -u -r1.1.2.39 -r1.1.2.40 --- squid/src/icap_reqmod.c 30 Mar 2005 15:18:52 -0000 1.1.2.39 +++ squid/src/icap_reqmod.c 30 Mar 2005 18:51:05 -0000 1.1.2.40 @@ -1,6 +1,6 @@ /* - * $Id: icap_reqmod.c,v 1.1.2.39 2005/03/30 15:18:52 chtsanti Exp $ + * $Id: icap_reqmod.c,v 1.1.2.40 2005/03/30 18:51:05 chtsanti Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -857,12 +857,19 @@ { IcapStateData *icap = request->body_reader_data;; debug(81, 3) ("icapReqModPassHttpBody: called\n"); + if(!buf){ + debug(81,1) ("icapReqModPassHttpBody: FD %d called with %p, %d, %p (request aborted)\n", + icap->icap_fd,buf,(int)size,cbdata); + comm_close(icap->icap_fd); + return; + } if (!cbdataValid(cbdata)) { debug(81, 1) ("icapReqModPassHttpBody: FD %d callback data invalid, closing\n", icap->icap_fd); - icapReqModKeepAliveOrClose(icap); + comm_close(icap->icap_fd); /*It is better to be sure that the connection will be closed.....*/ + /*icapReqModKeepAliveOrClose(icap);*/ return; } debug(81, 3) ("icapReqModPassHttpBody: entity buf size = %d\n",