]> git.ipfire.org Git - thirdparty/squid.git/commit - src/BodyPipe.cc
Bug #2311 fix: crashes with ICAP RESPMOD for HTTP body size greater than 100kb
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 5 Sep 2010 23:34:08 +0000 (17:34 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 5 Sep 2010 23:34:08 +0000 (17:34 -0600)
commit87728a5b09981273234397c994418c6cfa286fa1
tree6340c6a7a2ecd85435900b0b7ba99faad4fcc4f6
parent220d7675adbcc062c97a862b627bb1446a366340
Bug #2311 fix: crashes with ICAP RESPMOD for HTTP body size greater than 100kb

BodyPipe::undoCheckOut() must not assert that undo is possible because it
is not (currently) possible if the pipe buffer was modified.

BodyPipe::undoCheckOut() must not throw if undo is not possible because it is
often called when there is already an exception thrown and because it is
called from the BodyPipeCheckout destructor and destructors should not throw
(this case is an illustration for one reason why they should not).

Currently, we only use an implicit undo, and only when an exception
is being thrown while the buffer is checked out.

Currently, the code that does checkout is probably safe because it should
terminate the transaction if a parser throws. However, this is not 100%
guaranteed, and the situation may change without us noticing.

TODO: consider implementing the long-term solution discussed at
http://www.mail-archive.com/squid-dev@squid-cache.org/msg07910.html
COW-buffers may help here as well.
src/BodyPipe.cc