]> git.ipfire.org Git - thirdparty/squid.git/commit
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 23 Sep 2010 13:54:29 +0000 (07:54 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 23 Sep 2010 13:54:29 +0000 (07:54 -0600)
commit3168342cdd70e8e93f0426fe29a091df2438b30a
tree87667f0d666ac0519bc232f08fbc7040eac802fc
parent2c9be1ba34a82fc1d44f8f0432ab71ed1d611370
Author: Alex Rousskov <rousskov@measurement-factory.com>
Bug 2964: Prevent memory leaks when ICAP transactions fail.

We now make sure that heap-allocated objects are deleted if an exception
is thrown before the object pointers are saved/registered in a safe location
like a data member.

Assigning state.serviceWaiting=true after calling callWhenReady() in ModXact
prevents ModXact leak when callWhenReady() throws. This may need more work
to mark ModXact state appropriately for the adaptation log.

Based on lp 3p1-rock branch, r9610.

Added doneWithRetries() and used it to inform the request body sender that
there will be no more body consumers. This allows the sender (e.g., an ICAP
REQMOD transaction) to quit instead of waiting for body buffer space forever.

Moved !self check into checkRetry() because we need to call doneWithRetries()
even if self is nil. The move should not affect the old code.

Based on lp 3p1-rock branch, r9613.

At the end of preview, do not go into the writingPaused state if we already
received the final response from the ICAP server. Instead, stop writing so
that we do not get stuck waiting for the response that has already come.

May also handle header-only (zero-size) ieof Preview better.

TODO: Convert other HttpMsg pointer members to use safe HttpMsg::Pointer.
src/adaptation/icap/ModXact.cc
src/adaptation/icap/ModXact.h
src/adaptation/icap/OptXact.cc
src/adaptation/icap/OptXact.h
src/adaptation/icap/Xaction.cc
src/adaptation/icap/Xaction.h
src/client_side.cc
src/forward.cc
src/forward.h