--------------------- PatchSet 1929 Date: 2005/10/03 23:26:16 Author: dwsquid Branch: squid3-icap Tag: (none) Log: Try to clean up state if we encounter an ICAP header parsing error Members: src/ICAPXaction.cc:1.1.2.40->1.1.2.41 Index: squid3/src/ICAPXaction.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPXaction.cc,v retrieving revision 1.1.2.40 retrieving revision 1.1.2.41 diff -u -r1.1.2.40 -r1.1.2.41 --- squid3/src/ICAPXaction.cc 3 Oct 2005 16:31:12 -0000 1.1.2.40 +++ squid3/src/ICAPXaction.cc 3 Oct 2005 23:26:16 -0000 1.1.2.41 @@ -489,7 +489,14 @@ http_status error = HTTP_STATUS_NONE; const bool parsed = head->parse(&readBuf, state.doneReading, &error); - assert(!error); + + if (!parsed && error > 0) { // unrecoverable parsing error + debugs(11, 1, "ICAPXaction::parseHead: failed to parse ICAP header: '" << readBuf.content() << "'"); + notify = notifyHttp; + doStop(); + return; + } + if (!parsed) { head->reset();