--------------------- PatchSet 4742 Date: 2007/06/18 20:49:08 Author: rousskov Branch: squid3-icap Tag: (none) Log: Do not stop writing before throwing an exception. If the exception kills the transaction, the transaction should cleanup the writer anyway. To bypass an exception, we need all virgin content intact. Stopping writes before throwing an exception may consume virgin content because the code does not know that the exception is about to be thrown and may perceive content as "no longer needed". Members: src/ICAP/ICAPModXact.cc:1.1.2.35->1.1.2.36 Index: squid3/src/ICAP/ICAPModXact.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPModXact.cc,v retrieving revision 1.1.2.35 retrieving revision 1.1.2.36 diff -u -r1.1.2.35 -r1.1.2.36 --- squid3/src/ICAP/ICAPModXact.cc 18 Jun 2007 20:39:01 -0000 1.1.2.35 +++ squid3/src/ICAP/ICAPModXact.cc 18 Jun 2007 20:49:08 -0000 1.1.2.36 @@ -112,7 +112,6 @@ startWriting(); } else { disableRetries(); - stopWriting(false); throw TexcHere("ICAP service is unusable"); } @@ -613,10 +612,10 @@ stopParsing(); + stopWriting(true); // or should we force it? if (connection >= 0) { reuseConnection = false; // be conservative cancelRead(); // may not work; and we cannot stop connecting either - stopWriting(true); // or should we force it? if (!doneWithIo()) debugs(93, 7, "Warning: bypass failed to stop I/O" << status()); }