]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/OptXact.cc
Keep ICAP connection persistent after an OPTIONS response if possible.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 12 Sep 2010 21:58:38 +0000 (15:58 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 12 Sep 2010 21:58:38 +0000 (15:58 -0600)
commit0a1ac29e64a775db783a8ec18e18625ad6585b0b
tree2e840dddc342973a7f35fe6d8d8745726b112d88
parent2a6ab63653c9cee51192ad9b773ab100848c1d4f
Keep ICAP connection persistent after an OPTIONS response if possible.

Old OptXact code used Xaction::doneReading() which was only true at EOF.
Thus, closeConnection() was thinking we are still reading (i.e., not
doneWithIo) at the end of the transaction and force-closed the connection.

New OptXact implements its own doneReading() which returns true at EOF and
when we read the entire response. Since we cannot parse OPTIONS body and
do not know where it ends, OPTIONS responses with bodies still result in
connection closure. We should not be getting any, but there are broken ICAP
servers that do send them. Hopefully, they all use Encapsulated: opt-body.
src/adaptation/icap/OptXact.cc
src/adaptation/icap/OptXact.h